Part Number Hot Search : 
M54531P 4053BE 12011 1450C 2SC44 F1144HT 24C01A KS555D
Product Description
Full Text Search
 

To Download SPEAR-07-NC03 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  may 2006 rev 5 1/194 1 SPEAR-07-NC03 ethernet communication co ntroller with usb-host features based on arm720t (8k caches and mmu included) support a 10/100 mbits/s ethernet connection (ieee802.3) full-speed usb host co ntroller, supports 12mbit/s full speed devices uart interface: 115kbaud i 2 c interface: fast and slow. ieee1284 host controller real time clock timers and watchdog peripherals integrated pll (25mhz input, 48mhz output) up to 12 gpios (inc luding ieee1284 port) 8k sram shared with an external microprocessor static memory controller (up to 2 banks, max 16m each) dram controller sdram/edo (up to 4 banks, max 32m each) external i/o ba nks: 2 x 16kb. package lfbga 180 (12x12mm x1.7mm) description SPEAR-07-NC03 is a smart communication controller for usb and et hernet communication. SPEAR-07-NC03 allows th e sharing of a full- speed usb or ieee1284 or a uart peripherals inside an ethernet system. SPEAR-07-NC03 is supported by several operation systems such as ecos. order codes lfbga180 (12x12x1.7mm) part number op. temp. range, cpackage packing SPEAR-07-NC03 -40 to +105 lfbga180 tray www.st.com
table of contents SPEAR-07-NC03 2/194 table of contents 1 product overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.1 overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2 features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.1 architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.2 arm720t risc processor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.3 external memory interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.4 ieee802.3/ethernet mac . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.5 dma controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.6 uart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.7 timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.8 watchdog timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.9 gpio (programmable i/o) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.10 interrupt controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.11 ieee1284 host controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.12 usb host controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.13 shared sram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.14 real time clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.15 frequency synthesizer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3 top-level block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 4 pin descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 4.1 functional pin groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 4.2 pad types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 5 memory map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 5.1 global map (ahb) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 5.2 i/o map (apb) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 6 blocks description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 6.1 cpu subsystem & amba bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
SPEAR-07-NC03 table of contents 3/194 6.1.1 arm720 processor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 6.1.2 mmu overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 6.1.3 instruction and data cache overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 6.1.4 write buffer overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 6.1.5 configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 6.1.6 coprocessor registers programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 6.2 mac ethernet controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 6.2.1 overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 6.2.2 transfer logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 6.2.3 ethernet register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 6.2.4 register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 6.2.5 programming the dma mac . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 6.3 full-speed usb host controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 6.3.1 overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 6.3.2 host controller management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 6.3.3 initialization of the hci . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 6.3.4 operational states . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 6.3.5 operational registers mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 6.3.6 register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 6.4 ieee1284 host controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 6.4.1 overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 6.4.2 communication modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 6.4.3 matrix of protocol signal names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 6.4.4 register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 6.4.5 ieee1284 configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 6.4.6 dma registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 6.4.7 parallel port register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 6.5 uart controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 6.5.1 overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 6.5.2 registers map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 6.5.3 register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 6.6 i2c controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 6.6.1 overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 6.6.2 register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 6.6.3 register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 6.6.4 i2c functional description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
table of contents SPEAR-07-NC03 4/194 6.7 dynamic memory controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 6.7.1 overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 6.7.2 memory access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 6.7.3 address mapping table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 6.7.4 external bus interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 6.7.5 register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 6.7.6 register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 6.8 static memory controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 6.8.1 sramc description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 6.8.2 registers map and description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 6.9 shared sram controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 6.9.1 overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 6.9.2 external processor timings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 6.10 dma controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 6.10.1 overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 6.10.2 register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 6.10.3 registers description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 6.11 rtc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 6.11.1 overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 6.11.2 register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 6.11.3 register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 6.12 timer/counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 6.12.1 overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 6.12.2 registers map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 6.12.3 registers description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 6.13 watch-dog timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 6.13.1 overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 6.13.2 register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 6.13.3 register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 6.14 interrupt controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168 6.14.1 overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168 6.14.2 register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 6.14.3 register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 6.14.4 interrupt table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176 6.15 gpio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176 6.15.1 overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
SPEAR-07-NC03 table of contents 5/194 6.15.2 register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 6.15.3 registers description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 6.16 reset and clock controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 6.16.1 overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 6.17 pll (frequency synthesizer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 6.17.1 overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 6.17.2 global configuration block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 6.17.3 register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 6.17.4 registers description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 7 electrical characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 7.1 absolute maximum rating . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 7.2 recommended operating conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 7.3 dc electrical characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 7.3.1 powergood timing requirement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 7.4 ac electrical characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 7.5 external memory bus timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 7.5.1 timings for external cpu writing access . . . . . . . . . . . . . . . . . . . . . . . . . . 189 7.5.2 timings for external cpu reading access . . . . . . . . . . . . . . . . . . . . . . . . . . 190 8 reference document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191 9 package information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 10 revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
list of tables SPEAR-07-NC03 6/194 list of tables table 1. pin descriptions by functional groups. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 table 2. pin description by pad types (*lh) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 table 3. pad description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 table 4. ahb memory map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 table 5. apb memory map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 table 6. mrc and mcr (cp15) bit pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 table 7. control register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 table 8. ttb register. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 table 9. dac register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 table 10. tlb operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 table 11. ethernet register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 table 12. usb host controller operational register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 table 13. ieee1284 register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 table 14. dram address bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 table 15. memory bank size register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 table 16. bank size field and its corresponding actual size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 table 17. register map and description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 table 18. pin mapping for ieee1284 interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 table 19. pin mapping for jtag interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 table 20. pin mapping for nusb_enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 table 21. pin mapping for ni2c_enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 4 table 22. absolute maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 table 23. recommended operating conditions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 table 24. dc electrical characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 table 25. core power consumption (v dd = 1.8v, t a = 25c) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 table 26. expected timings for external cpu writing access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 table 27. expected timings for external cpu reading access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
SPEAR-07-NC03 list of figures 7/194 list of figures figure 1. spear net top level bock diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 figure 2. arm720t block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 figure 3. ethernet controller block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 figure 4. ethernet frame format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 figure 5. ieee802.3 frame format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 figure 6. dma descriptor chain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 figure 7. usb host controller block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 8 figure 8. usb focus areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 figure 9. ieee1284 block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 figure 10. ieee1284 - dma block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 figure 11. uart block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 figure 12. i2c controller block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 figure 13. i2c bus protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 figure 14. transfer sequencing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 figure 15. sdram controller block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 8 figure 16. sdram access example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 figure 17. edo access example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 figure 18. shared sram controller block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 figure 19. spear net write timing diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 49 figure 20. spear net read timing diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 figure 21. dma controller block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 figure 22. rtc block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 figure 23. timer/counter block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 figure 24. watch-dog timer block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 6 figure 25. interrupt controller block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168 figure 26. gpio block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176 figure 27. pll block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 figure 28. powergood requirement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 8 figure 29. external cpu writing timings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 figure 30. external cpu reading timingss . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 figure 31. lfbga180 mechanical data & package dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
1 product overview SPEAR-07-NC03 8/194 1 product overview 1.1 overview the SPEAR-07-NC03 is based on arm720t risc core, cache and mmu. it provide a bridge between four different i/f : 1. ieee802.3/ethernet mac core for network interface. its base interface with phy (physical layer) chip is capable of 10/100 mbps mii (medium independent interface) and 7-wire interface. 2. usb host controller with both interrupt-based and dma-based data handling method. 3. ieee1284 host controller offering co mpatibility mode, nibbl e mode and ecp mode. 4. shared ram (mail box method) for communication with other processors. 5. i 2 c master controller.
SPEAR-07-NC03 2 features 9/194 2 features 2.1 architecture integrated system for ethernet application 48mhz, 3.3v i/o and 1.8v internal core voltage arm720t risc processor core amba rev. 2.0 system bus architecture ieee802.3/ethernet compliant mac core usb interface solution (host) ieee1284 interface solution (master) 2.2 arm720t risc processor arm7tdmi risc core 8kb unified instru ction/data cache enlarged write buffer (8 words and 4 different addresses) virtual address support with mmu 2.3 external memory interface 16bit/8bit memory bus support rom/sram/flash static memory controller sdram/edo dram controller external i/o bank controller independent configurable memory and i/o banks replaceable memory and i/o bank addresses 2.4 ieee802.3/ethernet mac 10/100 mac, mac host block, station management block, address compliant with ieee 802.3 an d 802.3u specifications supports 10/100 mb/s data transfer rates ieee 802.3 media independent interface (mii) supports full and half duplex operations check block and the control status register (csr) block 2.5 dma controller dedicated channels for mac core, usb host and ieee1284 interface 2 channels general purpose dma (memory to memory)
2 features SPEAR-07-NC03 10/194 2 channels general purpose dma dedicated to the external requests (i/o to memory and memory to i/o) increments/decrements of source/destination address in 16/8bit(external), 32/16/ 8(internal) data transfers burst transfer mode 2.6 uart support for 8-bit serial data tx and rx selectable 2/1 stop bits selectable even, odd and no parity parity, overrun and framing error detection max transfer rate:115kbaude 2.7 timers channel programmable 16-bit timers with 8 bit pre-scaler 2.8 watchdog timer for recovery from unexpected system hang-up one programmable 16-bit watchdog timer with reset output signal (more than 200 system clock period to initial peripheral devices) programmable period 1 ~ 10 sec 2.9 gpio (programmable i/o) 4 dedicated programmable i/o ports (pins) 2 multiplexed pins with i2c bus signals pins individually configurable to input, output or i/o mode 2.10 interrupt controller 2 external interrupt sources support 9 internal interrupt sources. all channels can be individually rerouted to the fast (nfiq) or to the normal (nirq) processor lines level and edge (rise, fall and both) selectable software controlled priority 2.11 ieee1284 host controller compatibility/nibble/ecp/ epp mode host support
SPEAR-07-NC03 2 features 11/194 dma-based data trans fer capability for ecp fully software controllable operation mode 2.12 usb host controller full-speed usb compliant supports low speed and full speed devices configuration data stored in port configurable block single 48 mhz input clock integrated digital pll 2.13 shared sram external processor communication purpose shared sram bus arbiter same address can be accessed at the same time separated from ahb bus for bus traffic reduce interrupt output generation for transfer notification 2.14 real time clock real time clock-calendar (rtc) clocked by 32.768mhz low power clock input separated power supply (1.8 v) 14 digits (yyyy mm dd hh mm ss) precision 2.15 frequency synthesizer on-chip frequency synthesizer provided ?fin:25 mhz. ?fout:48 mhz
3 top-level block diagram SPEAR-07-NC03 12/194 3 top-level block diagram figure 1. spear net top level bock diagram text 8kb shared sram dramc sdram/edo dram controller dma controller 2 memory to memory 2 i/otomem & memtoi/o intc interrupt controller (16 ch) sramc rom/flash/sram external i/o controller shared sram bus arbiter rom/flash 2 banks sram/edo i/o external processor timer (2 channels) rtc uart (1 channel) mi2c usb host m1284h ieee1284 host contr. + dma mac110 ieee802.3/ethernet mac contr. + dma gpio (6 channels) ahb & apb mii & 7-wire phy interface usb interface ieee1284 interface ext bus xpaddr[12:0] xpdata[15:0] nxpcs nxpwe nxpre nxpwait nxpirq rx ndreq[1:0] ndack[1:0] nirq[1:0] wdt watch-dog timer reset controller nresetout powergood pll frequency synthesizer host contr. + dma 32 khz tx 25 mhz ahb decoder & arbiter, apb bridge, mux master to slave, mux slave to master external memory bus spear net i 2 c controller 8 kbyte cache (instr & data) arm720t microprocessor core & mmu wrapper from cpu to amba 4 banks 2 banks
SPEAR-07-NC03 4 pin descriptions 13/194 4 pin descriptions 4.1 functional pin groups note: note: symbol / me ans multiplexing modes table 1. pin descriptions by functional groups group pin name function remark clocks, reset and configuration. mclki oscillator clock input 25 mhz mclko oscillator clock output 25 mhz powergood system reset input nresetout peripheral chips driving reset output synchronous with system clock tmode0 test mode selector ?1? te s t pclk output clock (25 mhz) memory interface add[22:11], add[10]/ap, add[9:0] address bus add[10]/ap is the auto pre-charge control pin. the auto pre-charge command is issued at the same time as burst read or burst write by asserting high on add[10]/ ap rom banks: 16mb max. dram banks: 32mb max. data[15:0] external, bi-directional, 16 bit data bus nras[3:0]/ nsdcs[3:0] row address strobe for edo dram/ nsdcs is chip select pin for sdram nsdras row address strobe for sdram nsdcas column address strobe for sdram sdclk system clock for sdram 48 mhz cke clock enable signal for sdram nwe write enable for external devices. necs[1:0] chip select for external i/o bank banks size: 16kb nrcs[1:0] not rom/sram /flash chip select noe not output enable for memory i/o ncas[1:0]/ dqm[1:0] ncas is the column address strobe for edo dqm is data mask signal for sdram.
4 pin descriptions SPEAR-07-NC03 14/194 ethernet controller mdc management data clock mdio management data i/o col/ col_10m collision detected/collision detected for 10mbps tx_clk/ txclk_10m transmit clock/ transmit clock for 10mbps txd[3:0]/ txd_10m/ loop_10m transmit data/ transmit data for 10mbps tx_en/ txen_10m transmit enable/transmit enable for 10mbps crs/ crs_10m carrier sense/carrier sense for 10mbps rx_clk/ rxclk_10m receive clock/receive clock for 10mbps rxd[3:0]/ rxd_10m receive data/receive data for 10mbps rx_dv/ link_10m receive data valid rx_err receive error group pin name function remark uart rxdata uart receive data txdata uart transmit data jtag interface tck test clock input tdi test data input tdo test data output tms test mode select input trst test reset line gpi/o gpi/o[5:0] general purpose i/o #5 and #4/ i 2 c bus controller sda, scl i2c interface scl serial clock line sda serial data line table 1. pin descriptions by functional groups (continued) group pin name function remark
SPEAR-07-NC03 4 pin descriptions 15/194 external processor interface xpdata[15:0] external processor data bus high byte xpaddr[12:0] external processor address bus nxpcs shared sram cs from external processor nxpwe shared sram write strobe from ext. proc. nxpre shared sram read strobe from ext. proc. nxpwait wait signal to external processor nxpirq interrupt request to external processor usb uhd+ usb host differential data signal high side uhd- usb host differential data signal low side ieee1284 ppdata[7:0] data lines to/from peripheral nstrobe strobe line to peripheral nack ack line from peripheral busy busy line from peripheral perror paper error line from peripheral select selection feedback from peripheral nautofd auto feed signal to peripheral nfault generic error line from peripheral ninit init (reset) line to peripheral nselectin select signal to peripheral ppdatadir direction control for external transceiver rtc rtcxi rtc oscillator input line 32.768 khz rtcxo rtc oscillator output line 32.768 khz misc. nxirq[1:0] external interrupt request lines nxdrq[1:0] external request lines for dma nxdack[1:0] external acknowledge lines from dma configuration sdram/edo dram type selection pull-up sdramm usbenable usb transceiver enable or disable pull-up enabled ieee1284/ xprocessor ieee1284 or external processor selection pull-up ieee1284 bootrombuswidth bus width selection for rom 0 pull-up 16 bits uart/jtag debug interface selection pull-up uart genconf[2:0] general purpose configuration lines power vdd_core internal logic core vdd (1.8v 5%) vdd_i/o i/o pad vdd (3.3v 5%) vdd_rtc rtc vdd (1.8v 5%) gnd ground table 1. pin descriptions by functional groups (continued) group pin name function remark
4 pin descriptions SPEAR-07-NC03 16/194 4.2 pad types table 2. pin description by pad types (*lh) ref. ball name type dir. 1 b1 mclki ana - 2c1 mclko osci27b i 3 f2 powergood schmitt_tc i 4 e4 nresetout b4tr_tc o 5 d1 tmode0 schmitt_tc i 6 e3 pclk bd4tarp_tc o 7 f5 add0 b8tr_tc o 8 g4 add1 b8tr_tc o 9 g2 add2 b8tr_tc o 10 g1 add3 b8tr_tc o 11 g5 add4 b8tr_tc o 12 h4 add5 b8tr_tc o 13 h5 add6 b8tr_tc o 14 h1 add7 b8tr_tc o 15 h3 add8 b8tr_tc o 16 j4 add9 b8tr_tc o 17 j5 add10_ap b8tr_tc o 18 j2 add11 b8tr_tc o 19 j3 add12 b8tr_tc o 20 k5 add13 b8tr_tc o 21 k2 add14 b8tr_tc o 22 l1 add15_genconf0 bd8strp_tc i/o 23 k4 add16_genconf1 bd8strp_tc i/o 24 l2 add17_genconf2 bd8strp_tc i/o 25 m1 add18_uart/jtag bd8strp_tc i/o 26 n1 add19_bootrombuswidth bd8strp_tc i/o 27 m3 add20_ieee1284/xprocessor bd8strp_tc i/o 28 n2 add21_usbenable bd8strp_tc i/o 29 p1 add22_sdram/edo bd8strp_tc i/o 30 p3 data0 bd8struqp_tc i/o 31 n4 data1 bd8struqp_tc i/o 32 p4 data2 bd8struqp_tc i/o 33 n5 data3 bd8struqp_tc i/o
SPEAR-07-NC03 4 pin descriptions 17/194 34 p5 data4 bd8struqp_tc i/o 35 m6 data5 bd8struqp_tc i/o 36 n6 data6 bd8struqp_tc i/o 37 p6 data7 bd8struqp_tc i/o 38 l6 data8 bd8struqp_tc i/o 39 m7 data9 bd8struqp_tc i/o 40 n7 data10 bd8struqp_tc i/o 41 k7 data11 bd8struqp_tc i/o 42 l7 data12 bd8struqp_tc i/o ref. ball name type dir. 43 m8 data13 bd8struqp_tc i/o 44 k8 data14 bd8struqp_tc i/o 45 p8 data15 bd8struqp_tc i/o 46 n8 nras0_nsdcs0 b4tr_tc o 47 m9 nras1_nsdcs1_tdi bd4struqp_tc i/o 48 k9 nras2_nsdcs2_tdo b4tr_tc o 49 p9 nras3_nsdcs3_ntrst bd4struqp_tc i/o 50 n9 nsdras b4tr_tc o 51 m10 nsdcas b4tr_tc o 52 p2 sdclk bd4tarp_tc o 53 n10 cke b2tr_tc o ref. ball name type dir. 54 p11 nwe b8tr_tc o 55 l10 necs0 b4tr_tc o 56 p12 necs1 b4tr_tc o 57 n11 nrcs0 b2tr_tc o 58 p14 nrcs1 b2tr_tc o 59 n12 noe b8tr_tc o 60 n13 ncas0_dqm0 b4tr_tc o 61 m12 ncas1_dqm1 b4tr_tc o 62 m13 mdc b4tr_tc o 63 n14 mdio bd4struqp_tc i/o 64 m14 col/col10m schmitt_tc i 65 k12 txclk/txclk10m schmitt_tc i 66 l14 txd0/txd010m b4tr_tc o table 2. pin description by pad types (*lh) (continued) ref. ball name type dir.
4 pin descriptions SPEAR-07-NC03 18/194 67 k13 txd1/txd110m b4tr_tc o 68 k14 txd2/txd210m b4tr_tc o 69 j12 txd3/txd310m b4tr_tc o 70 k10 txen/txen10m b4tr_tc o 71 j13 crs/crs10m schmitt_tc i 72 j14 rxclk/rxclk10m schmitt_tc i 73 j10 rxd0/rxd010m schmitt_tc i 74 h13 rxd1/rxd110m schmitt_tc i 75 h11 rxd2/rxd210m schmitt_tc i 76 h14 rxd3/rxd310m schmitt_tc i 77 h10 rxdv/link10m schmitt_tc i 78 g11 rxerr schmitt_tc i 79 g10 rxdata_tck schmitt_tc i 80 g14 txdata_tms bd4struqp_tc i/o 81 a3 gpio0 bd4struqp_tc i/o 82 b4 gpio1 bd4struqp_tc i/o 83 a2 gpio2 bd4struqp_tc i/o 84 a1 gpio3 bd4struqp_tc i/o ref. ball name type dir. 85 b3 gpio4_scl bd4struqp_tc i/o 86 c3 gpio5_sda bd4struqp_tc i/o 87 f10 nxirq0 schmitt_tc i 88 f14 nxirq1 schmitt_tc i 89 e10 nxdrq0 schmitt_tc i 90 f12 nxdrq1 schmitt_tc i 91 e14 nxdack0 b4tr_tc o 92 e13 nxdack1 b4tr_tc o 93 e1 rtcxo ana - 94 e2 rtcxi osci32b i 95 d14 xpdata0_ppdata0 bd8struqp_tc i/o 96 e11 xpdata1_ppdata1 bd8struqp_tc i/o 97 d13 xpdata2_ppdata2 bd8struqp_tc i/o 98 b14 xpdata3_ppdata3 bd8struqp_tc i/o 99 c13 xpdata4_ppdata4 bd8struqp_tc i/o 100 c12 xpdata5_ppdata5 bd8struqp_tc i/o table 2. pin description by pad types (*lh) (continued) ref. ball name type dir.
SPEAR-07-NC03 4 pin descriptions 19/194 101 b13 xpdata6_ppdata6 bd8struqp_tc i/o 102 b12 xpdata7_ppdata7 bd8struqp_tc i/o 103 a13 xpdata8 bd8struqp_tc i/o 104 b11 xpdata9 bd8struqp_tc i/o 105 c10 xpdata10 bd8struqp_tc i/o 106 a11 xpdata11 bd8struqp_tc i/o 107 b10 xpdata12 bd8struqp_tc i/o 108 d10 xpdata13 bd8struqp_tc i/o 109 b9 xpdata14 bd8struqp_tc i/o 110 a9 xpdata15 bd8struqp_tc i/o 111 d9 xpaddr0_nstrobe bd2struqp_tc i/o 112 c9 xpaddr1_nack schmitt_tc i 113 a8 xpaddr2_busy schmitt_tc i 114 e8 xpaddr3_perror schmitt_tc i 115 d8 xpaddr4_select schmitt_tc i 116 c8 xpaddr5_nautofd bd2struqp_tc i/o 117 e7 xpaddr6_nfault schmitt_tc i 118 d7 xpaddr7_ninit bd2struqp_tc i/o 119 b7 xpaddr8_selectin bd2struqp_tc i/o 120 c7 xpaddr9_ppdatadir bd2struqp_tc i/o 121 a6 xpaddr10 schmitt_tc i 122 b6 xpaddr11 schmitt_tc i 123 d6 xpaddr12 schmitt_tc i 124 c6 nxpcs schmitt_tc i 125 d5 nxpwe schmitt_tc i 126 a5 nxpre schmitt_tc i 127 a4 nxpwait b4tr_tc o ref. ball name type dir. 128 c5 nxpirq b4tr_tc o 129 f11 uhd+ usb_pad i/o 130 g13 uhd- usb_pad i/o 131 e6, a12, e12, g12, l13, p10, l8, k6, m5, m2, k1, h2, f4 vdd3i/o power - table 2. pin description by pad types (*lh) (continued) ref. ball name type dir.
4 pin descriptions SPEAR-07-NC03 20/194 144 d2, g3, j1, k3, n3, l5, p7, l9, p13, k11, h12, c14, f13, a14, a10 vss power - 459 f3 vddrtc power - 160 e5 vssrtc power 161 b2 vdd3pll power - 162 c2 vsspll power 163 f1, j11, e9 vdd power - 166 b8, a7, b5 vss power - 169 c4, c11, d3, d4, d11, d12, l3, l4, l11, l12, m4, m11 nc not connected - table 3. pad description pad name description ana analog pad buffer b2tr_tc ttl output pad buffer, 3 v capable, 2ma drive capability b4tr_tc ttl output pad buffer, 3 v capable, 4ma drive capability b8tr_tc ttl output pad buffer, 3 v capable, 8ma drive capability bd2struqp_tc ttl schmitt trigger bidirectional pad buffer, 2ma drive capability, 3 v capable, with pull-up bd4struqp_tc ttl schmitt trigger bidirectional pad buffer, 4ma drive capability, 3 v capable with pull-up bd4tarp_tc ttl bidirectional pad buffer, 3 v capable, 4ma drive capability, active slew rate bd8strp_tc ttl schmitt trigger bidirectional pad buffer, 8ma drive capability, 3 v capable bd8struqp_tc ttl schmitt trigger bidirectional pad buffer, 8ma drive capability, 3 v capable with pull-up osci27b oscillator (max frequency 27 mhz) osci32b oscillator (32 khz) schmitt_tc ttl schmitt trigger input pad buffer 3 v tolerant usb_pad usb transceiver v dd3 ioco power pad - internal supply for 3.3 v level v dd co power pad - internal supply for 1.8 v level v ss co power pad - internal ground, for core only v ss ioco power pad - internal ground table 2. pin description by pad types (*lh) (continued) ref. ball name type dir.
SPEAR-07-NC03 5 memory map 21/194 5 memory map 5.1 global map (ahb) table 4. ahb memory map note: the decoder will ignore the add 31 lines. in this way will be possible to access all the devices trough cache in range 0x000.0000 - 0x7fff.ffff and without cache in range 0x8000.0000 - 0xffff.ffff 5.2 i/o map (apb) table 5. apb memory map starting address end address description 0x000.0000 0x01ff.ffff two rom/flash/sram banks. ? bank size granularity: 64 kb ? max bank size: 16 mb ? the two banks are adjacent. 0x1000.0000 0x17ff.ffff four sdram/edo banks. ? max bank size: 32 mb ? bank size granularity: 64 kb ? the four banks are adjacent. 0x2000.0000 0x2000.7fff two external i/o banks bank size: 16 kb 0x2100.0000 0x2100.1fff 8 kb shared sram 0x2200.0000 0x2200.0bff ieee1284 interface & fifos 0x2300.0000 0x2300.03ff arm slave test interface 0x3000.0000 0x3000.37ff apb bridge starting address end address description 0x3000.0000 0x3000.03ff interrupt controller 0x3000.0400 0x3000.07ff general purpose timers 0x3000.0800 0x3000.0bff watch dog timer 0x3000.0c00 0x3000.0fff real time clock 0x3000.1000 0x3000.13ff general purpose i/o 0x3000.1400 0x3000.17ff i 2 c interface 0x3000.1800 0x3000.1bff uart 0x3000.1c00 0x3000.1fff c onfiguration registers 0x3000.2000 0x3000.23ff dma controller general purpose 0x3000.2400 0x3000.27ff static memory controller 0x3000.2800 0x3000.2bff dynamic memory controller 0x3000.2c00 0x3000.2fff usb host controller 0x3000.3000 0x3000.33ff dma mac 0x3000.3400 0x3000.37ff mac ethernet controller
6 blocks description SPEAR-07-NC03 22/194 6 blocks description 6.1 cpu subsystem & amba bus figure 2. arm720t block diagram 6.1.1 arm720 processor the arm720t is a general purpose 32-bit risc microprocessor with 8kb cache, enlarged write buffer and memory management unit (mmu) combined in a single chip. the cpu within arm720t is the arm7tdmi. the on-chip mixed data and instruction cache, toge ther with the write buffer, substantially raise the average execution speed and reduce the av erage amount of memory bandwidth required by the processor. the mmu supports a conventional two-level, page-table structure and the memory interface has been designed to allow the performance potential to be realized without incurring high costs in the memory system. 6.1.2 mmu overview the memory management mmu performs two primary functions. it: translates virtual addresses into physical addresses controls memory access permissions the mmu hardware required to perform these functions consists of: a translation look-aside buffer (tlb) access control logic translation-table-walking logic when the mmu is turned off (as happens on reset) , the virtual address is output directly onto the physical address bus. mmu 8kb cache arm7tdmi cpu data and address buffers amba interface data and address buffers amba interface control and clocking logic system control coprocessor amba bus interface coprocessor interface
SPEAR-07-NC03 6 blocks description 23/194 6.1.3 instruction and data cache overview arm720t contains an 8kb mixed instruction and data cache (idc). the cache only operates on a write-through basis with a read-miss allocation policy and a random replacement algorithm. the idc has 512 lines of 16 bytes (four words), arranged as a 4-way set-associative cache, and uses the virtual addresses generated by the pr ocessor core after relo cation by the process identifier as appropriate. the idc is always reloaded a line at a time (4 words). it may be enabled or disabled via the arm720t control register and is disabled immediately after the power-on reset. the operation of the cache is further controlled by the cacheable (c bit) stored in the memory management page table. for this reason, the mmu must be enabled in order to use the idc. however, the two functions may be enabled simultaneously, with a single write to the control register. 6.1.4 write buffer overview the arm720t write buffer is provided to improve system performance. it can buffer up to eight words of data, and four independent addresses and may be enabled or disabled via the w bit (bit 3) in the arm720t control register. the buffer is disabled and flushed on reset. the write buffer operation is further controlled by the bufferable (b) bit, which is stored in the memory management page tables. for this reason, the mmu must be enabled so you can use the write buffer. the two functions may however be enabled simultaneously, with a single write to the control register. 6.1.5 configuration the operation and configuratio n of arm720t is controlled: directly via coprocessor instructions indirectly via the memory management page tables the coprocessor instructions manipulate a number of on-chip registers which control the configuration of the following: cache write buffer mmu a number of other configuration options
6 blocks description SPEAR-07-NC03 24/194 6.1.6 coprocessor re gisters programming the arm720t instruction set allows specialized additional instruction to be implemented using coprocessor. the memory unit in the arm720t core is referred as coprocessor 15 (cp15). important: cp15 registers can only be accessed with mrc and mcr instructions in a privileged mode . cdp, ldc and stc instructions, as well as unprivileged mrc and mcr instructions to cp15 cause the undefined instruction trap to be taken. the bit fields of the instruction are shown in the following table: table 6. mrc and mcr (cp15) bit pattern symbol description cond: condition code field l: direction 0 store to coprocessor (mcr) 1 load from coprocessor (mrc) rd: arm register crn: coprocessor register crm: should be zero except when accessing register 7, 8 and 13. opcode_1: should be zero opcode_2: should be zero except when accessing register 7, 8 and 13. note that the cpid field, bit 11:8, is set to 15 (mmu coprocessor). the assembler syntax is: {cond} p15, opcode_1, rd, crn, crm, opcode_2 6.1.6.1 registers register 0, id (ro) it is a read-only register. crm and opcode_2 should be zero. reading from this register return always 0x 41807203. last nibble is the revision number. register 1, control (r/w) crm and opcode_2 should be zero. the control bits pattern is shown in table 7. control register 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 cond. 1110 opcode_1 l crn rd 1 1 1 1 opcode_2 1 crm 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 unp/sbz v unp/sbz r s b l d p w c a m
SPEAR-07-NC03 6 blocks description 25/194 example: ldr r0, =0x0f ; enable mmu wi th cache, write buffer and mcr p15, 0, r0, 1, 0, 0 ; alignment fault register 2, translation table base (r/w) crm and opcode_2 should be zero. this is the currently active first-level translation table. only bit 31:14 are valid. the others are unpredictable when read, should be zero if written. table 8. ttb register register 3, domain access control (r/w) crm and opcode_2 should be zero. the domain access control register consists of 16 2-bit fields, each of which defines the access permissions for one of the 16 domains (d15-d0). the meaning of this bit is described in the mmu translation mechanism. table 9. dac register register 4 (reserved) register 5, fault status register (fsr) register 6, fault address register (far) register 7, cache operations (wo) m mmu enable/disable bit ( 0= disable, 1 = enable) a alignment fault enable/disable bit (0 = disable, 1 = enable) c cache enable/disable bit (0 = disable, 1 = enable) w write buffer enable/disable bit (0 = disable, 1 = enable) p when read return always 1. when written is ignored. d when read return always 1. when written is ignored. l when read return always 1. when written is ignored. b endianess bit ( 0 = little endian, 1 = big endian) s system protection (see access permission ap bits) r rom protection (see access permission bits) v location of exception vectors (windows ce) unp/sbz unp redictable when read, s hould b e z ero when written. 313029282726252423222120191817161514131211109876543210 translationtable unp/sbz 313029282726252423222120191817161514131211109876543210 d15 d14 d13 d12 d11 d10 d9 d8 d7 d6 d5 d4 d3 d2 d1 d0
6 blocks description SPEAR-07-NC03 26/194 for this operation opcode_2 must be 0x0b000 and crm must be 0x0b0111. this operation invalidates all cache data. use with caution. reading from it is undefined. example: mcr p15, 0, r0, c7, c7, 0 ; invalidate all the data inside cache register 8, tlb operations two operation are defined as showed on the following table: table 10. tlb operation the invalidate tlb invalidates all of the unlocked entries in the tlb. the invalidate tlb single entry invalidates any tlb entry corresponding to the virtual address in rd. register 9 to 12 are reserved register 13, oricess identifier not used register 14 to 15 are reserved 6.2 mac ethernet controller figure 3. ethernet controller block diagram 6.2.1 overview the ethernet media access controller (mac110) core incorporates the essential protocol requirements for operation of an ethernet/ieee 802.3 compliant node, and provides interface between the host subsystem and the media independent interface (mii). the mac110 core can function opcode_2 crm (rd) assembler syntax invalidate entire tlb 0b000 0b0111 0 mcr p15, 0, rd, c8, c7, 0 invalidate tlb (single entry) 0b001 0b0111 virt ual address mcr p15, 0, rd, c8, c7, 1 mii i/f m i m mac block local fifo dma rx & tx logic configuration registers array data configuration ahb master apb slave
SPEAR-07-NC03 6 blocks description 27/194 operate either in 100mbps mode or the 10mbps mode based on the clock provided on the mii interface (25/2.5 mhz). the mac110 core operates both in half-duplex mode and full-duplex modes. when operating in the half- duplex mode, the mac110 core is fully compliant to section 4 of iso/iec 8802-3 (ansi/ieee standard) and ansi/ieee 802.3. wh en operating in the full-duplex mode, the mac110 core is compliant to the ieee 802.3x st andard for full-duplex operations. it is also compatible with home pna 1.1. the mac110 core provides programmable enhanced features designed to minimize host supervision, bus utilization, and pre- or post-message proces sing. these features include ability to disable retires after a collision, dynamic fcs generatio n on a frame-by-frame basis, automatic pad field insertion and deletion to enforce minimum frame size attributes, automatic retransmission and detecti on of collision frames. the mac110 core can sustain transmission or reception of minimal-sized back -to-back packets at full line speed with an inter-packet gap (ipg) of 90.6 us for 10-mb/s and 0.96 us for 100-mb/s. the five primary attributes of the mac block are: 1. transmit and receive message data encapsulation ? framing (frame boundary delimit ation, frame synchronization) ? error detection (physical medium transmission errors) 2. media access management ? medium allocation (collisi on detection, ex cept in full-d uplex operation) ? contention resolution (c ollision handling, except in full-duplex operation) 3. flow control during full duplex mode ? decoding of control frames (pause command) and disabling the transmitter ? generation of control frames 4. interface to the phy ? support of mii protocol to interface with a mii based phy. 5. management interface support on mii ? generation of phy management frames on the mdc/mdi/mdo. to minimize the cpu load during the data transfer is available a local dma with fifo capable to fetch itself the descriptors for the data bl ocks and to manage the data according to the instruction included on the descriptor. 6.2.2 transfer logic 6.2.2.1 rx logic the receive (rx) dma block includes all the logic required to manage data transfers from the rx port of the mac110 wrapper to an external ahb memory mapped device. it includes: rx wrapper interface rx fifo rx dma master sm dma descriptor sm
6 blocks description SPEAR-07-NC03 28/194 6.2.2.2 rx wrapper interface the wrapper interface is a simple synchronous interface with rx_nreq, rx_nack, rx_data signals for data handshake, plus some sideband signals for the mac protocol support (see later). the data path (rx_data) is 32 bit wide. when the rx dma logic has been enabled, after a valid descriptor fetch, the rx interface control logic starts driving the rx_nack signal, de-asserting it when the internal fifo becomes full or the dma transfer completes. the wrapper logic will drive the rx _nreq signal when it has data valid to be transferred: the transfer is done, and the data can be updated, if rx_nreq and rx_nack are both asserted on the same clock. rx fifo the fifo depth can be 2/4/8/16/32 entries, 32 bit each. the rx fifo is loaded by the rx wrapper interface logic and read by the rx dma master sm. the fifo download is done with 32 bits operations (possibly burst type to optimize the bus bandwidth). if there are some incomplete words coming from the mac core (this con occurs only at the end of the frame) the dma adds some dummy bytes in order to complete the word and increase the performance. added bytes have an undefined value. rx dma master sm the rx dma block has a state machine (sm) dedicated to the dma master operation. when enabled via the rx configuration registers, it's able to manage the rx data transfer without further processor intervention. the dma transfer can be: dma continuous/fixed size: the dma can be re quired to run indefinitely or to stop after a configured number of data bytes has been transferred fixed/incrementing address: the dma address can be fixed (i.e. all the data are transferred to the same ahb word aligned address) or it can be updated after each data transfer linear incrementing or wrapping address: when the address is defined as incrementing, it can be required that, once reached a programmed value, the address counter wraps back to the initial address value (the address location, pointed by the wrapping address, is not modified) with fifo entry threshold: the dma sm starts transferring data on the ahb bus when a programmable number of 32 bit rx fifo entries is valid when the dma is enabled, as soon as data appear s in the fifo, the dma may either initiate an ahb transfer immediately, or be delayed until x data bytes are available in the fifo (fifo entry threshold). the dma can be configured to wrap-round the ahb address at some point to implement a circular buffer in cpu memory. the dma can be configured to run indefinitely or to stop after dma_xfercount data have been transferred.
SPEAR-07-NC03 6 blocks description 29/194 when the dma completes, the master dma sm can be required to assert an interrupt request to the processor and wait for new instruction, or to wake up the dma descriptor sm to require a new dma descriptor fetch. to save gates, the implementation limits the maximum dma transfer count to 4 kbytes, hence the xfer_count field in the dma control registers is limited to 12 bits. the dma start address (dma_address) must be 32 bit word aligned. the dma wrapping address point must be 32 bit word aligned. if an ahb error condition occurs, while the dma is running, the sm activity is suspended, until the error interrupt bit (merr_int) is reset. when the error condition is removed the dma makes the same request previously interrupted by the error response. dma descriptor sm a dedicated sm has been implemented that, when required by the dma master logic, starts some ahb master read operations to load from the external memory all the information (dma descriptors) required to start the new dma data transfer. the dma descriptor consists of a valid bit plus 3 registers: the dma control (dma_ctl), the dma base address (dma_addr) and the dma next descriptor address register (dma_nxt). the host processor must ensure that the descrip tors are up to date in memory when the dma descriptor sm loads them. the fetch order is: dma_ctl, dma_addr , dma_nxt and valid bit. if a fetched descriptor is not valid (valid=0), then the dma engine can be programmed to stop the operation (reset the dma_en bit in rx_d ma_start) and raise an interrupt (rx_done), or to repeat the descriptor fetch operation, until a valid descriptors is found. the interrupt register bit named rx_next is always set when a not valid descriptor is loaded. in the first case, the dma will t hen wait for the host processor to re-enab le the dma operation (start_fetch bit in the rx_dma_start register set to 1) before attempting anew descriptor fetch. while, when in polling mode, the dma will keep reloading the descript or, with an access frequency determined by the dfetch_dly field in the rx_dma_start register. an ahb error response suspends the descriptor sm activity and reset the dma_en bit in rx_dma_start register. to help the erro r source understanding, the rx_dma_caddr register value is the address at which the error occurred. after clearing the error bit, the sw needs to re program the dma registers, to start again a new descriptor fetch. 6.2.2.3 tx logic the transmit (tx) dma block includes all the logic required to manage data transfers from an external ahb memory mapped device to the tx port of the mac110 wrapper. it includes: tx wrapper interface tx fifo tx dma master sm dma descriptor sm
6 blocks description SPEAR-07-NC03 30/194 tx wrapper interface the wrapper interface is a simple synchronou s interface with tx_nreq, tx_nack, tx_data signals for data handshake, plus some sideband signals for the mac protocol support (see later). the data path (tx_data) is 32 bit wide. when the tx dma logic has been enabled, as soon as the internal fifo is no more empty the tx interface control logic starts driving the tx_na ck signal, de-asserting it when the internal fifo becomes empty again or the dma transfer completes. the wrapper has to drive the tx_nreq signal when it accept valid data to be transferred: the transfer is done and the data can be updated if tx_nreq and tx_nack are both asserted on the same clock. tx fifo the fifo depth can be 2/4/8/16/32 entries, 32 bit each. the tx fifo is loaded by the tx dma master sm and read by the tx wrapper interface. the fifo load is usually done with 32 bits operations (possibly burst type to optimize the bus bandwidth), unless the dma end has been reached and the dma buffer size is not a multiple of 32 bits. tx dma master sm the tx dma block has a state machine (sm) dedicated to the dma master operation. when enabled via the tx configuration registers, it's able to manage the tx data transfers without further processor intervention. the dma transfer can be: dma continuous/fixed size: the dma can be required to run indefinitely or to stop after a configured number of data bytes has been transferred fixed/incrementing address: the dma address can be fixed (i.e. all the data are transferred from the same ahb, word aligned, address) or it can be updated after each data transfer linear incrementing or wrapping address: when th e address is defined as incrementing, it can be required that, once reached a programmed value, the address counter wraps back to the initial address value (the address location, pointed by the wrapping address, is not accessed) with fifo entry threshold: the dma sm starts transferring data on the ahb bus when a programmable number of 32 bit tx fifo entries is empty when the dma is enabled, as soon as one free entry is available in the fifo, the dma may initiate ahb transfers immediately, or can be delayed. the dma may be delayed until x data entries are available in the fifo (fifo entry threshold). the dma can be configured to wrap-round the ahb address at some point to implement a circular buffer in cpu memory. the dma can be configured to run indefinitely or to stop after dma_xfercount data have been transferred. when the dma completes, the master dma sm can be required to assert an interrupt request to the processor and wait for new instruction, or to wake up the dma descriptor sm, to require a new dma descriptor fetch. to save gates, the implementation limits the maximum dma transfer count to 4kbytes, hence the xfer_count field in the dma control registers is limited to 12 bits. the dma start address (dma_address) must be 32 bit word aligned and the dma wrapping address point must be 32 bit word aligned.
SPEAR-07-NC03 6 blocks description 31/194 if an ahb error condition occurs, while the dma is running, the sm activity is suspended, until the error interrupt bit (merr_int) is reset. when the error condition is removed the dma makes the same request previously interrupted by the error response. special care must be taken when the fifo entry to be read has 3 valid bytes: in this case, because the ahb protocol doesn't allow to 3 byte transfers, the ahb master splits the transfer in two single transfers (byte + half or half + byte) and sends an acknowledge signal to the fifo only when the second one has been read. if the second read receives an error response then, when the error condition is removed, the dma repeats even the first one (because the fifo has not yet see the acknowledge). dma descriptor sm a dedicated sm has been implemented that, when required by the dma master logic, starts some ahb master read operations to load from the external memory all the information (dma descriptors) required to start the dma data transfer. the dma descriptor consists of a valid bit plus 3 registers: the dma control (dma_ctl), the dma base address (dma_addr) and the dma next descriptor address register (dma_nxt). the host processor must ensure that the descrip tors are up to date in memory when the dma descriptor sm loads them. the fetch order is: dma_ctl, dma_addr , dma_nxt and valid bit. if a fetched descriptor is not valid (valid=0), then the dma engine can be programmed to stop the operation (reset the dma_en bit in tx_dma_start) and raise an interrupt (tx_done), or to repeat the descriptor fetch operation, until a valid descriptors is found. the interrupt register bit named tx_next is always set when a not valid descriptor is loaded. in the first case, the dma w ill then wait for the hp to re-enable the dma operation (start_fetch bit in the tx_dma_start regi ster set to 1) before attempting a new descriptor fetch. while, when in polling mode, the dma will keep reloading the descript or, with an access frequency determined by the dfetch_dly field in the tx_dma_start register. an ahb error response suspends the descriptor sm activity and reset the dma_en bit in tx_dma_start register. to help the error source understanding, the tx_dma_caddr register value is the address at which the error occurred. after clearing the error bit, the sw needs to re program the dma registers, to start again a new descriptor fetch. 6.2.3 ethernet register map table 11. ethernet register map address register name description 0x3000_3000 dma_sts_cntl ethernet dma, status and control register 0x3000_3004 dma_int_en ethernet dma, interrupt sources enable register 0x3000_3008 dma_int_sts ethernet dm a, interrupt status register 0x3000_300c reserved - 0x3000_3010 rx_dma_start ethernet dma, rx start register
6 blocks description SPEAR-07-NC03 32/194 0x3000_3014 rx_dma_cntl ethernet dma, rx control register 0x3000_3018 rx_dma_addr ethernet dma, rx base address register 0x3000_301c rx_dma_nxt ethernet dma, rx next descriptor address register 0x3000_3020 rx_dma_caddr ethernet dma, rx current address register 0x3000_3024 rx_dma_cxfer ethernet dma, rx current transfer count register 0x3000_3028 rx_dma_to ethernet dma, rx time out register 0x3000_302c rx_dma_fifo ethernet dma, rx fifo status register 0x3000_3030 tx_dma_start ethernet dma, tx start register 0x3000_3034 tx_dma_cntl ethernet dma, tx control register 0x3000_3038 tx_dma_addr ethernet dma, tx base address register 0x3000_303c tx_dma_nxt ethernet dma, tx next descriptor address register 0x3000_3040 tx_dma_caddr ethernet dma, tx current address register 0x3000_3044 tx_dma_cxfer ethernet dma, tx current transfer count register 0x3000_3048 tx_dma_to ethernet dma, tx time out register 0x300_304c tx_dma_fifo ethernet dm a, tx fifo status register 0x3000_3050 - 0x3000_30fc reserved - 0x3000_3100 - 0x3000_317c rx_fifo rx local fifo (32 double word = 128 byte) 0x3000_3180 - 0x3000_31fc reserved - 0x3000_3200 - 0x3000_327c tx_fifo tx local fifo (32 double word = 128 byte) 0x3000_3280 - 0x3000_33fc reserved - 0x3000_3400 mac_cntl mac control register 0x3000_3404 mac_addh mac address high register 0x3000_3408 mac_addl mac address low register 0x3000_340c mac_mchth mac, multi cast hash table high register 0x3000_3410 mac_mchtl mac, multi cast hash table low register 0x3000_3414 mii_addr mii, address register 0x3000_3418 mii_data mii, data register 0x3000_341c fcr flow control register 0x3000_3420 vlan1 vlan1 tag register 0x3000_3424 vlan2 vlan2 tag register 0x3000_3428 - 0x3000_34fc reserved - table 11. ethernet register map (continued) address register name description
SPEAR-07-NC03 6 blocks description 33/194 0x3000_3500 mmc_ctrl_reg mmc statistic control register 0x3000_3504 mmc_int_hi_reg mmc statistic interrupt high register 0x3000_3508 mmc_int_lo_reg mmc stat istic interrupt low register 0x3000_350c mmc_int_msk_hi_re g mmc statistic interrupt mask high register 0x3000_3510 mmc_int_msk_lo_re g mmc statistic interrupt mask low register 0x3000_3600 rxnumfrmsallcntr all frames received counter. this includes good and bad frames. counter is incremented each time a frame is received. 0x3000_3604 rxnumfrmsokcntr good frame received counter. this includes good frames only, which are free from runt frame error, frame too long error, collision error, mii error, dribble bit error, crc error, invalid length error and fifo overflow error. 0x3000_3608 rxcntrlfrmscntr control frames received counter. this includes control frames, which are free from runt frame error, frame too long error, collision error, mii error, dribble bit error, crc error, invalid length error and fifo overflow error. 0x3000_360c rxunsupcntrlcntr unsupported control frames received counter. this includes control frames, which are free from runt frame error, frame too long error, collision error, mii error, dribble bit error, crc error, invalid length error and fifo overflow error but whose length/ type field is not supported. 0x3000_3610 rxnumbytsallcntr no of bytes received counter. this includes all frames frame length added. excludes preamble. 0x3000_3614 rxnumbytsokcntr no of bytes received counter. this includes all frames frame length added which are free from runt frame error, frame too long error, collision error, mii error, dribble bit error, crc error, invalid length error and fifo overflow error. 0x3000_3618 rxlenequal64cntr frame with length equal to 64 bytes counter. includes good and bad frames. 0x3000_361c rxlen65_127cntr frame with length from 65 to 127 bytes counter. includes good and bad frames. 0x3000_3620 rxlen128_255cntr frame with length from 128 to 255 bytes counter. includes good and bad frames. 0x3000_3624 rxlen256_511cntr frame with length from 256 to 511 bytes counter. includes good and bad frames. 0x3000_3628 rxlen512_1023cntr frame with length from 512 to 1023 bytes counter. includes good and bad frames. 0x3000_362c rxlen1024_maxcntr frame with length from 1024 to maxpktsize bytes counter. includes good and bad frames. table 11. ethernet register map (continued) address register name description
6 blocks description SPEAR-07-NC03 34/194 0x3000_3630 rxunicastcntr unicast frames received counter. this includes good frames only. 0x3000_3634 rxmulticastcntr multicast frames received counter. this includes good frames only. 0x3000_3638 rxbroadcastcntr broadcast frames received counter. this includes good frames only. 0x3000_363c rxfifooverflowcntr frames with fifo error counter. counter with rx fifo overflow error. this counter is incremented if the missed frame bit in receive status is set. 0x3000_3640 rxminlencntr runt frame counter. counter for frames with a minimum frame length violation. this counter is incremented if the runt frame bit in receive status is set. 0x3000_3644 rxmaxlencntr long frames counter. counter for frames with a maximum frame length violation. this counter is incremented if the fram e too long bit in receive status is set. 0x3000_3648 rxcrcerrorcntr frame with a crc error counter. this counter is incremented if the crc error bit in receive status is set. 0x3000_364c rxalignerrorcntr frames with a dribble bit counter. this counter is incremented if the dribble bit in receive status is set. 0x3000_3650 rxlenghterrcntr length error frames counter. this counter is incremented if the length error bit in receive status is set. 0x3000_3654 rxethrtypfrmcntr ethernet frames counter. this counter is incremented when the frame type bit in receive status is set. 0x3000_3658 - 0x3000_36ff reserved 0x3000_3700 txnumfrmsallcntr no of frames transmitted counter. this includes good and bad frames but no retries. counter is incremented each time the transmit status is received. 0x3000_3704 txcntrlfrmscntr no of control frames transmitted counter. counter for good control frames only. counter is incremented each time transmit status is received and if the frame transmitted is a control frame. does not include retries. 0x3000_3708 txnumbytsallcntr total number of transmitted bytes counter. counter is incremented each time transmit status is received. includes good and bad frames but no retries. 0x3000_370c txnumbytsokcntr total number of (well) transmitted bytes counter. counter for bytes of a good frame transmitted. does not include retries. the good frames are the ones for which the frame abort and packet retry bits in transmit status are reset. table 11. ethernet register map (continued) address register name description
SPEAR-07-NC03 6 blocks description 35/194 0x3000_3710 txlenequal64cntr frames with length equal to 64 counter. counter for frames with length equal to 64. includes good and bad frames but no retries. 0x3000_3714 txlen65_127cntr frames with length from 65 to 127 counter. counter for frames with length between 65 and 127 bytes. includes good and bad frames but no retries. 0x3000_3718 txlen128_255cntr frames with length from 128 to 255 counter. counter for frames with length between 128 and 255 bytes. includes good and bad frames but no retries. 0x3000_371c txlen256_511cntr frames with length from 256 to 511 counter. counter for frames with length between 256 and 511 bytes. includes good and bad frames but no retries. 0x3000_3720 txlen512_1023cntr frames with length from 512 to 1023 counter. counter for frames with length between 512 and 1023 bytes. includes good and bad frames but no retries. 0x3000_3724 txlen1024_maxcntr frames with length from 1024 to maxpktsize counter. counter for frames with length between 1024 and maximum frame lenght bytes. includes good and bad frames but no retries. 0x3000_3728 txunicastcntr no of unicast frames transmitted counter. includes good frames only, no retries. 0x3000_272c txmulticastcntr no of multicast frames transmitted counter. includes good frames only, no retries. 0x3000_3730 txbroadcastcntr no of broadcast frames transmitted counter. includes good frames only, no retries. 0x3000_3734 txfifoundflocntr no of frames aborted due to fifo error counter. this counter is incremented when the under run bit in transmit status is set. 0x3000_3738 txnumbadfrmscntr no of frames aborted counter. this counter is incremented if ei ther the frame aborted or the heart bit fail are set in transmit status. 0x3000_373c txsinglecolcntr no of frames with single collision counter. the counter is incremented wh en the collisions count = 1 and packet retry set in transmit status. 0x3000_3740 txmulticolcntr no of frames with multiple collisions counter. the counter is incremented wh en the collisions count > 1 and packet retry set in transmit status. 0x3000_3744 txnumdeffredcntr no of frames deferred counter. this counter is incremented when the deferred bit in transmit status is set. 0x3000_3748 txlatecolcntr no of frames with late collision counter. this counter is incremented when the late collision bit in transmit status is set. table 11. ethernet register map (continued) address register name description
6 blocks description SPEAR-07-NC03 36/194 0x3000_374c txabortedfrmscntr no of frames aborted counter. this counter is incremented when the frame aborted bit in transmit status is set. 0x3000_3750 txnocrscntr number of frames with no carrier counter. this counter is incremented when either the no carrier or the loss of carrier bit in transmit status is set. 0x3000_3754 txxsdeferalcntr no of frames with excessive deferral counter. this counter is incremented when the excessive deferral bit in transmit status is set. 0x3000_3758 - 0x3000_37fc reserved table 11. ethernet register map (continued) address register name description
SPEAR-07-NC03 6 blocks description 37/194 6.2.4 register description all the registers are 32 bit wide. 6.2.4.1 ethernet dma, status and control register mnemonic : dma_sts_cntl address : 0x3000_3000 default value: 4a4a0101 tx_fifo_size : size of transmitter data path fifo. value: 04 16 * 32 bit words. tx_io_data_width : width of the i/o bus transmit data path. value: 2'b10 32 bit. tx_io_channel_status : tx channel status structure. value: 2'b10 high end tx channel capable of dma descriptor fetch. rx_fifo_size : size of receiver data path fifo. value: 04 16 * 32 bit words. rx_io_data_width : width of the i/o bus receiver data path. value: 2'b10 32 bit. bit field name access 31 - 28 tx_fifo_size ro 27 - 26 tx_io_data_width ro 25 - 24 tx_channel_status ro 23 - 20 rx_fifo_size ro 19 - 18 rx_io_data_width ro 17 - 16 rx_channel_status ro 15 - 08 revision ro bit field name access 07 - 06 tx_max_burst_size rw 05 - 04 rx_max_burst_size rw 03 - 02 reserved ro 01 loopb rw 00 sreset rw
6 blocks description SPEAR-07-NC03 38/194 rx_io_channel_status : rx channel status structure. value: 2'b10 high end rx channel capable of dma descriptor fetch. revision : revision of the dma block. value: 0x01 tx_max_burst_size : maximum value of defined length burst that the tx dma_mac logic will perform on the ahb bus to re ad data from t he main memory. 2'b00 16 beat incrementing burst (incr16) 2'b01 8 beat incrementing burst (incr8) 2'b10 4 beat incrementing burst (incr4) 2'b11 single transfer only (single) descriptor fetch operation isn't affected by this field. rx_max_burst_size : maximum value of defined length burst that the rx dma_mac logic will perform on the ahb bus to wr ite data to the main memory. 2'b00 16 beat incrementing burst (incr16) 2'b01 8 beat incrementing burst (incr8) 2'b10 4 beat incrementing burst (incr4) 2'b11 single transfer only (single) descriptor fetch operation isn't affected by this field. loopb : set to '1' to enable the dma block loop_ back mode. when set the rx dma data are extracted by the tx fifo and pushed in the rx one. sreset : dma soft reset. set to '1' to hold the whole dma_mac and mac110 logic in reset condition. write '0' to exit from the reset phase. note: after a hw reset, the dma logic wakes up with the sreset bit asserted ('1'), to keep all the dma and mac110 logic in the reset condition, until the sw is sure that clocks and the other mii signals, inputs to the mac110 core, are stable. when this condition is me t, the sw is allowed to clear the sreset bit (write '0') to start the normal operation. until the sreset bit is set to '1', no operation is allowed on the dma_mac or mac110 registers, except the sreset bit clear. this signal has no effect on the ahb interface so, when assert ed runtime, the whole dma will be reset only when the last ahb transfer, in the ahb master queue, has been completed.
SPEAR-07-NC03 6 blocks description 39/194 6.2.4.2 ethernet dma, inte rrupt sources enable register mnemonic : dma_int_en address : 0x3000_3004 default value : 0x0000_0000 the dma interrupt enable register allows the various sources of interrupt to be individually enabled. all the enabled sources will then be or-ed to generate the global dma interrupt. setting a bit in dma_int_en allows the corresponding interrupt described in dma_int_stat to influence the global dma interrupt. if any bit position is set to '1' in both dma_int_stat and dma_int_en, then the dma interrupt will be asserted. refer to the dma_int_stat for a description of interrupt sources. bit field name access 31 tx_curr_done_en rw 30 - 29 reserved ro 28 mac110_int_en rw 27 - 26 reserved ro 25 tx_merr_int_en rw 24 reserved ro 23 tx_done_en rw 22 tx_next_en rw 21 - 20 reserved ro 19 tx_to_en rw 18 tx_entry_en rw 17 tx_full_en rw 16 tx_empty_en rw 15 rx_curr_done_en rw 14 - 10 reserved ro 09 rx_merr_int_en rw 08 reserved ro 07 rx_done_en rw 06 rx_next_en rw 05 packet_lost_en rw 04 reserved ro 03 rx_to_en rw 02 rx_entry_en rw 01 rx_full_en rw 00 rx_empty_en rw
6 blocks description SPEAR-07-NC03 40/194 6.2.4.3 ethernet dma, interrupt status register mnemonic : dma_int_sts address : 0x3000_3008 default value : 0x0000_0000 dma interrupt status register re ports the interrupt status of interrupts from the following sources: dma rx, dma tx, mac110. all the register locations are read/clear (rc): th ey can be read, a write with '0' has no effect, while writing '1' reset the bit. tx_curr_done : set when the tx master dma has completed the current dma transfers. bit field name access 31 tx_curr_done rc 30 - 29 reserved ro 28 mac110_int rc 27 - 26 reserved ro 25 tx_merr_int rc 24 reserved ro 23 tx_done rc 22 tx_next rc 21 - 20 reserved ro 19 tx_to rc 18 tx_entry rc 17 tx_full rc 16 tx_empty rc 15 rx_curr_done rc 14 - 10 reserved ro 09 rx_merr_int rc 08 reserved ro 07 rx_done rc 06 rx_next rc 05 packet_lost rc 04 reserved ro 03 rx_to rc 02 rx_entry rc 01 rx_full rc 00 rx_empty rc
SPEAR-07-NC03 6 blocks description 41/194 this bit differs from the tx_done because th e tx_current_done will be set after a single dma descriptor execution has been completed, t he status register updated and the descriptor valid bit cleared, while the tx_done will be set on ly after all the descript ors in the descriptor chain have been fully executed. write '1' to clear flag. mac110_int : set when the external mac110 de vice sets an interrupt request. write '1' to clear flag. tx_merr_int : set when the ahb master receives an error response from the selected slave and the internal arbiter is granting the tx fifo. write '1' to clear flag. tx_done : set when the tx ma ster dma completes. write '1' to clear flag. tx_next : set when a descriptor fetch operation loads an invalid entry. write '1' to clear flag. tx_to : set when some data are stall ed in the tx fifo for too long. write '1' to clear flag. tx_entry : set when the tx dma is triggered by a number of empty tx fifo entries bigger than the value set in the dma_cntl register. write '1' to clear flag. tx_full : set when the tx fifo becomes fu ll (< 4 byte entries available). write '1' to clear flag. tx_empty : set when the tx fifo becomes empty. write '1' to clear flag. rx_curr_done : set when the rx master dma has completed the current dma transfers. this bit differs from the rx_done because the rx_current_done will be set after a single dma descriptor execution has been completed, t he status register updated and the descriptor valid bit cleared, while the rx_d one will be set only after all th e descriptors in the descriptor chain have been fully executed. write '1' to clear flag. rx_merr_int : set when the ahb master receives an error response from the selected slave and the internal arbiter is granting the rx fifo. write '1' to clear flag. rx_done : set when the rx master dma completes. write '1' to clear flag. rx_next : set when the descriptor fetch operation loads an invalid entry. write '1' to clear flag.
6 blocks description SPEAR-07-NC03 42/194 packet_lost : set by the rx wrapper when there is an incoming frame but the rx dma logic cannot service it because: the rx fifo is not empty yet or the next descriptor fetch is still running write '1' to clear flag. rx_to : set when some data are stalled in the rx fifo for too long. write '1' to clear flag. rx_entry : set when the rx dma is triggered by a number of valid rx fifo entries bigger than the value set in the dma_cntl register. write '1' to clear flag. rx_full : set when the rx fifo becomes full and no more data can be accepted. write '1' to clear flag. rx_empty : set when the rx fifo becomes empty. write '1' to clear flag. 6.2.4.4 ethernet dma, rx start register mnemonic : rx_dma_start address : 0x3000_3010 default value: 0x0000_0000 dfetch_dly : descriptor fetch delay. this field specifies, in a bus clock periods, the delay between two descriptor fetches, in the event that the descriptor in main memory is not valid. when set to '0' it forces the dma_mac logic, in case of invalid descriptor, to wait for 2**16 system bus clocks before attempting a new fetch. bit field name access 31 - 24 reserved ro 23 - 08 dfetch_dly rw 07 call_seen rw 06 runt_frame rw 05 filter_fail rw 04 - 03 reserved ro 02 start_fetch rs 01 reserved ro 00 dma_en rc
SPEAR-07-NC03 6 blocks description 43/194 coll_seen : when '1' the late collisio n seen condition, reported by the mac110 in the rx packet status word, will make the received fram e to be discharged by the dma_mac, without any report to the cpu. when '0' no action will be taken by the dma_mac. runt_frame : when '1' the damaged fr ame condition (e.g. normal collision, frame too short, etc.), reported by the mac110 in the rx packet status word, will make the received frame to be discharged by the dma_mac, without any report to the cpu. when '0' no action will be taken by the dma_mac. filter_fail : when '1' the address filtering failed condition, reported by the mac110 during the rx packet transmission, will make the rece ived frame to be discharged by the dma_mac, without any report to the cpu. when '0' no action will be taken by the dma_mac. if this bit is set the data of packets that don' t match the address filter ing process (inside the mac core) are not moved to the memo ry reducing the ahb bus utilization. start_fetch : this bit is a read/set bit, that means it can be both read and written, but writing a '0' has no effect. the sw has to set this bit to '1' when the rx dma has to st art fetching the first descriptor. the dma logic will reset to '0' this bit and set th e dma_en to '1' as soon as the first fetch has been completed. note: before starting the dma, the dma_nxt register has to be loaded with the starting address of the descriptor to be fetched. dma_en : read/clear bit: a write with '1' reset to '0' the bit value, while a write with '0' has no effect. this bit, set to '1' by the dma after the first de scriptor fetch, can be reset to '0' by the sw to force a dma abort and stop as soon as possible the data transfer, before the dma completion. when all the dma sequences complete normally, this bit is reset by the dma_mac logic and a new sw intervention is required to restart the dma engine. note: the dma_en 0->1 transition resets the fifo content and the rx interrupts (dma_int_stat(15:0)). the dma_en 1->0 transition forces the dma to close immediately the transfers toward ahb bus and mac core. when the ahb transfer completes the dma_int_stat.rx_done interrupt is set and the processor can reprogram and reactivate the rx logic.
6 blocks description SPEAR-07-NC03 44/194 6.2.4.5 ethernet dma, rx control register mnemonic : rx_dma_cntl address : 0x3000_3014 default value: 0x0000_0000 addr_wrap : determines where the dma address counter wraps by forcing the dma address counter to retain the data originally writ ten by the host in dma_addr. as soon as the dma has written the memory location prior to the value specified in add_wrap the wrapping condition occurs. this can be used to restrict the address counter within an address window (e.g. circular buffer). the wrapping point must be 32 bit aligned, so the 10 bits of addr_wrap are used to compare dma address bits 11 to 2; if add_wrap=dma_addr(11:2) then a 4kbyte buffer is defined. addrwrap is ignored unless wrap_en is set. entry_trig : determines the amount of valid entries (in 32 bit words) required in the receive fifo before the dma is re-triggered. if the value is set to 0, as soon as one valid entry is present, the dma logic starts the data transfer. dly_en : this bit enables (when '1') the dma trigger delay feature: if a fifo valid data resides in the fifo more than a programmed period (d ma_to), a time-out condition occurs that requires the dma sm to empty the fifo even if the number of valid words doesn't exceed the threshold value. nxt_en : next descriptor fetch mode enable. set to '1', this bit enables the next descriptor fetch mechanism. whenever a dma transfer is completed, if this fi eld is set, a new dma descriptor is fetched. if this field is '0' then no descriptor is fetc hed and an interrupt is raised as normal. note when a descriptor is fetched rx_d ma_ctl is one of t he registers updated cont_en : continuos mode enable. this bit enables the dma to run in continuo mode. if set the dma runs indefinitely ignoring dma_ xfercount. note: "continuos mode" supersedes "next descriptor mode". bit field name access 32 - 22 addr_wrap rw 21-17 entry_trig rw 16 reserved ro 15 dly_en rw 14 nxt_en rw 13 reserved ro 12 cont_en rw 11 - 00 dma_xfercount rw
SPEAR-07-NC03 6 blocks description 45/194 dma_xfercount : block size (in bytes) of dma data transfer, up to 4 kbytes. if dma_xfercount is set to '0', the dma will transfer 4 kbyte data. note: rx_dma_cntl.xfercount is us ed to provide an upper limit to the number of bytes the system can accept for each frame (it's usually equa l to the dedicated frame buffer size in main memory). when this limit is not exceeded, all the data received from the line, via the mac110 core, are copied to the memory frame buffer, and the effective length of the transfer it's the real frame size. on the other side, if the packet exceeds the xfercount value it will be truncated. the xfercount value must be approximated to the next word aligned block size (i.e. if the desired transfer size is 123 bytes, then the programmed value should be 124). 6.2.4.6 ethernet dma, rx base address register mnemonic : rx_dma_addr address : 0x3000_3018 default value: 0x0000_0000 dma_addr : start address, 32 bit word aligned, for master dma transfer. this register is read by the dma sm only befo re starting the dma operation and when the wrap condition is met, so fu rther updates of this register will have un predictable effects on the running dma. fix_addr : disables incrementing of dma_addr: this means that all the dma data transfer operation will be performed at the same ahb address, i.e. th e dma base address. wrap_en : enables wrap of the dma transfer address to dma_addr when the memory location, specified in addr_wrap, is reached. 6.2.4.7 ethernet dma, rx ne xt descriptor address register mnemonic : rx_dma_nxt address : 0x3000_301c default value: 0x0000_0000 bit field name access 31 - 02 dma_addr rw 01 fix_addr rw 00 wrap_en rw bit field name access 31 - 02 dma_descr_addr rw 01 reserved ro 00 npol_en rw
6 blocks description SPEAR-07-NC03 46/194 dma_descr_addr : when the dma next descriptor fetch is enabled, this register points to the next descriptor starting address. the dma descriptors are 32 bits, so the dma_descr_addr must be 32 bit aligned. this register allows different dma descriptors to be located in different memory area, because part of the current dma descriptors, provides in formation to point to the next one (descriptor chaining). if the dma descriptor fetch is not enabled, this register doesn't need to be updated. npol_en : next descriptor polling enable. when in 'next descriptor fetch mode', the descriptor fetch logic can load a not jet valid descrip tor: if the npol is enabled ('1'), the logic is required to keep polling the dma descriptor in main memory, until it's found to be valid. note: in case of not valid descripto r, dma_mac behavior will be differ ent depending on the npol bit; we can have: npol=1 (polling enabled) -> the rx_next bit will be set and a new descriptor fetch will be attempt after dfetch_dly clocks npol=0 (polling disabled) -> the rx_done bit will be set and the dma_en bit, in dma_start register, will be cleared. 6.2.4.8 ethernet dma, rx current address register mnemonic : rx_dma_caddr address : 0x3000_3020 default value : 0x0000_0000 dma_caddr : current dma address value, byte aligned. the value of this regist er will change while the dma is running, reflecti ng the value driven by the core on the ahb bus. 6.2.4.9 ethernet dma, rx cu rrent transfer count register mnemonic : rx_dma_cxfer address : 0x3000_3024 default value: 0x0000_0000 dma_cxfer : current dma transfer count value. it's updated while the dma is running, when one word data is moved from the mac core to the dma fifo, reporting the number of bytes that can still be accepted. bit field name access 31 - 00 dma_caddr ro bit field name access 31 - 12 reserved ro 11 - 00 dma_cxfer ro
SPEAR-07-NC03 6 blocks description 47/194 6.2.4.10 ethernet dma, rx time out register mnemonic : rx_dma_to address : 0x3000_3028 default value: 0x0000_0000 time_out : this value is used as initial value for the fifo entry time_out counter (it's recommended not to use too low value, to avoid too frequent interrupts). the time-out counter starts as soon as one valid entry is present in the fifo and is reset every time a data is pop out of the fifo. the counter expires (fifo time_out condition) if no fifo data are pop for a period longer than the time_out register value; w hen this happens, depending on the control registers settings, an interrupt can be set. 6.2.4.11 ethernet dma, rx fifo status register mnemonic : rx_dma_fifo address : 0x3000_342c default value: 0x0000_0000 entries : full entries (in 32 bit words) in fifo. dma_pointer : fifo dma sm side pointer value. io_pointer : fifo io side pointer value. delay_t : set to '1' when the dma fifo delay time_out is expired. entry_t : set to '1' when the dma fifo entry trigger threshold has been reached. bit field name access 31 - 16 reserved ro 15 - 00 time_out rw bit field name access 31-30 reserved ro 29-24 entries ro 23-21 reserved ro 20-16 dma_pointer ro 15-13 reserved ro 12-08 io_pointer ro 07-04 reserved ro 03 delay_t ro 02 entry_t ro 01 full ro 00 empty ro
6 blocks description SPEAR-07-NC03 48/194 full : set to '1' when dma fifo is full. empty : set to '1' when the dma fifo is empty. 6.2.4.12 ethernet dma, tx start register mnemonic : tx_dma_start address : 0x3000_3030 default value: 0x0000_0000 dfetch_dly : descriptor fetch delay. this field specifies, in a bus clock periods, the delay between two descriptor fetches, in the event that the descriptor in main memory is not valid. when set to '0' it forces the dma_mac logic, in case of invalid descriptor, to wait for 2**16 system bus clocks before attempting a new fetch. add_crc_dis : this bit drives the mac110 input pin add_crc_disable to tell the mac110 core not to add the crc field at the end of the frame. if its value is modified while the dma is e nabled, the results will be unpredictable. pa d d in g _ d is : this bit drives the mac110 input pin disable_padding, to avoid the mac110 add the padding bits for frames too short. if its value is modified while the dma is e nabled, the results will be unpredictable. underrun : when '1', the under run condition, reported by the mac in the tx packet status word, will enable the dma logic to retransmit the same packet to th e mac110 core, without reporting any error condition to the cpu. start_fetch : this bit is a read/set bit, that means it can be both read and written, but writing a '0' has no effect. the sw has to set this bit to '1' when the tx dma has to start fetching the first descriptor. the dma logic will reset to '0' this bit and set th e dma_en to '1' as soon as the first fetch has been completed. note: before starting the dma, the dma_nxt register has to be loaded with the starting address of the descriptor to be fetched. dma_en : read/clear bit: a write with '1' reset to '0' the bit value, while a write with '0' has no effect. bit field name access 31-24 reserved ro 23-08 dfetch_delay rw 07 add_crc_dis rw 06 padding_dis rw 05 underrun rw 04-03 reserved ro 02 start_fetch rs 01 reserved ro 00 dma_en rc
SPEAR-07-NC03 6 blocks description 49/194 this bit, set to '1' by the dma after the first de scriptor fetch, can be reset to '0' by the sw to force a dma abort and stop as soon as possible the data transfer, before the dma completion. when all the dma sequences complete normally, this bit is reset by the dma_mac logic and a new sw intervention is required to restart the dma engine. note: the dma_en 0->1 transition resets th e fifo content and the tx interrupts (dma_int_stat (31:16)). the dma_en 1->0 transition forces the dma to close immediately the transfers toward ahb bus and mac core. when the ahb transfer completes the dma_int_stat.tx_done interrupt is set and the processor can reprogram and reactivate the tx logic. 6.2.4.13 ethernet dma, tx control register mnemonic : tx_dma_cntl address : 0x3000_3034 default value : 0x0000_0000 addr_wrap : determines where the dma address counter wraps by forcing the dma address counter to retain the data originally writ ten by the host in dma_addr. as soon as the dma has read the memory location prior to the value specified in add_wrap the wrapping condition occurs. this can be used to restrict the address counter within an address window (e.g. circular buffer). the wrapping point must be 32 bit aligned, so the 10 bits of addr_wrap are used to compare dma address bits 11 to 2; if add_wrap=dma_addr(11:2) then a 4kbyte buffer is defined. addrwrap is ignored unless wrap_en is set. entry_trig : determines the amount of empty entries (in 32 bit words) required in the tx fifo before the dma is re-triggered. if the value is set to 0, as soon as one empty entry is present, the dma logic starts the data request. dly_en : this bit enables (when '1') the dma trigger delay feature: if a fifo valid data resides in the fifo more than a programmed period (d ma_to), a time-out condition occurs and the related (tx_to) inte rrupt will be set. bit field name access 31-22 addr_wrap rw 21-17 entry_trig rw 16 reserved ro 15 dly_en rw 14 nxt_en rw 13 reserved ro 12 cont_en rw 11-00 dma_xfer_count rw
6 blocks description SPEAR-07-NC03 50/194 nxt_en : next descriptor fetch mode enable. set to '1', this bit enables the next descriptor fetch mechanism. whenever a dma transfer is completed, if this fi eld is set, a new dma descriptor is fetched. if this field is '0' then no descriptor is fetc hed and an interrupt is raised as normal. note: when a descriptor is fetched tx_dma_ctl is one of the registers updated. cont_en : continuos mode enable. this bit enables the dma to run in continuos mode. if set the dma runs indefinitely ignoring dma_ xfercount. note "continuos mode" supersedes "next descriptor mode". dma_xfercount : block size (in bytes) of dma, maximum 4 kbytes. if dma_xfercount is set to '0', the dma will transfer 4 kbyte data. 6.2.4.14 ethernet dma, tx base address register mnemonic : tx_dma_addr address : 0x3000_3038 default value: 0x0000_0000 dma_addr : start address, 32 bit word aligned, for master dma transfer. this register is read by the dma sm only befo re starting the dma operation and when the wrap condition is met, so fu rther updates of this register will have un predictable effects on the running dma. fix_addr : disables incrementing of dma_addr: this means that all the dma data transfer operation will be performed at the same ahb address, i.e. th e dma base address. wrap_en : enables wrap of the dma transfer address to dma_addr when the memory location, specified in addr_wrap, is reached. 6.2.4.15 ethernet dma, tx ne xt descriptor address register mnemonic: tx_dma_nxt address: 0x3000_303c default value: 0x0000_0000 dma_descr_addr : when the dma next descriptor fetch is enabled, this register points to the next descriptor starting address. the dma descriptors are 32 bits, so the dma_descr_addr must be 32 bit aligned. bit field name access 31-02 dma_addr rw 01 fix_addr rw 00 wrap_en rw bit field name access 31-02 dma_descr_addr rw 01 reserved ro 00 npol_en rw
SPEAR-07-NC03 6 blocks description 51/194 this register allows different dma descriptors to be located in different memory area, because part of the current dma descriptors, provides in formation to point to the next one (descriptor chaining). if the dma descriptor fetch is not enabled, this register doesn't need to be updated. npol_en : next descriptor polling enable. when in 'next descriptor fetch mode', the descriptor fetch logic can load a not jet valid descrip tor: if the npol is enabled ('1'), the logic is required to keep polling the dma descriptor in main memory, until it's found to be valid. note: in case of not valid descripto r, dma_mac behavior will be differ ent depending on the npol bit; we can have: npol=1 (polling enabled) -> the tx_next bit will be set and a new descriptor fetch will be attempt after dfetch_dly clocks npol=0 (polling disabled) -> the tx_done bit will be set and the dma_en bit, in dma_start register, will be cleared. 6.2.4.16 ethernet dma, tx current address register mnemonic : tx_dma_caddr address : 0x3000_3040 default value : 0x0000_0000 dma_caddr : current dma address value, byte aligned. the value of this register will change while the dma is running, reflecting the value driven by the core on the ahb bus. 6.2.4.17 ethernet dma, tx cu rrent transfer count register mnemonic : tx_dma_cxfer address : 0x3000_3044 default value : 0x0000_0000 dma_cxfer : current dma transfer count value. it's updated while the dma is running, when one data is moved from the main memory to the dma fifo, reflecting the number of bytes that must be still read. bit field name access 31-02 dma_caddr ro bit field name access 31-12 reserved ro 11-00 dma_cxfer ro
6 blocks description SPEAR-07-NC03 52/194 6.2.4.18 ethernet dma, tx time out register mnemonic : tx_dma_to address : 0x3000_3048 default value : 0x0000_0000 time_out : this value is used as initial value for the fifo entry time_out counter (it's recommended not to use too low value, to avoid too frequent interrupts). this counter starts as soon as one valid entry is present in the fifo and is reset every time a fifo data is pop out of the fifo. the counter expires (fifo time_out condition) if no fifo data are pop for a period longer than the time_out register value; w hen this happens, depending on the control registers settings, an interrupt can be set. 6.2.4.19 ethernet dma, tx fifo status register mnemonic : tx_dma_fifo address : 0x3000_304c default value : 0x0000_0000 entries : free entries (in 32 bit words) in fifo. dma_pointer : fifo dma sm side pointer value. io_pointer : fifo io side pointer value. delay_t : set to '1' when the dma fifo delay time_out is expired. entry_t : set to '1' when the dma fifo entry trigger threshold has been reached. bit field name access 31-16 reserved ro 15-00 time_out rw bit field name access 31-30 reserved ro 29-24 entries ro 23-21 reserved ro 20-16 dma_pointer ro 15-13 reserved ro 12-08 io_pointer ro 07-04 reserved ro 03 delay_t ro 02 entry_t ro 01 full ro 00 empty ro
SPEAR-07-NC03 6 blocks description 53/194 full : set to '1' when dma fifo is full. empty : set to '1' when the dma fifo is empty. 6.2.4.20 mac control register mnemonic : mac_cntl address : 0x3000_3400 default value : 32'b00000000_00000100_00000000_00000000 the mac control register establishes the rx and tx operating modes and controls for address filtering and packet filtering. table 5 describes the bit fields of the register. bit field name access 31 ra rw 30 ble rw 29 reserved ro 28 hbd rw 27 ps rw 26 - 24 reserved ro 23 dro rw 22 - 21 om rw 20 fdm rw 19 pam rw 18 prm rw 17 if rw 16 pbf rw 15 hofm rw 14 reserved ro 13 hpfm rw 12 lcc rw 11 dbf rw 10 drt rw 09 reserved ro 08 astp rw 07 - 06 bolmt rw 05 dc rw 04 reserved ro 03 txe rw 02 rxe rw 01 - 00 reserved ro
6 blocks description SPEAR-07-NC03 54/194 ra : receive all. when set, all in coming packets will be received, regardless of the destination address. the address match checked according to table 22, and is reported in transmit status. ble : endian mode. when ble is set, the mac operates in the big endian mode. when ble is reset, the mac operates in the little endian mode. the endian mode is only for the data buffers. hbd : heart beat disable. when set, the heartbeat signal quality (sqe) generator function is disabled. this bit should be set in the mii mode. ps : port select. when reset, the mii port is se lected and when set, the srl (endec) port is selected for transmit/receive operations on the ethernet side. dro : dro-disable receive own. when dro is set, the mac110 disables the reception of frames when the txen is as serted. the mac110 will bloc k the transmitted frame on the receive path. when dso is rese t, the mac110 receives all the packets that are given by the phy including those transmitted by the mac100. this bit should be reset when the full duplex mode bit is set or the operating mode is not set to 'normal mode'. om : om-loop-back operating mode. this bit selects the loop-back operation modes for the mac110. this setting is on ly for full duplex mode. in the internal loop-back mode, the tx frame is received by the mii, and turned around back to the mac110. in the external mode however, the tx frame is sent up to the phy. the phy will then turn that tx frame back to be received by the mac110. note: that in the external mode the application has to set the phy in loop-back mode by setting bit- 14 in the register space of the phy. (ieee802.3 sec.22.2.4.1) fdm : full duplex mode. when set, the mac operates in a full-duplex mode where it can transmit and receive simultaneously. while in full-duplex mode: heartbeat check is disabled, heartbeat fail status should be ignored, and internal loop back is not allowed. pa m : pass all multicast. when set, indicates that all the incoming frames with a multicast destination address (first bit in the destination address field is '1' are received. incoming frames with physical address destinations are filter ed only if the address matches with the mac address. prm : promiscuous mode. when set, indicates that any incoming valid frame is received regardless of its destination address. if : if-inverse filtering. when if is set, address check block operates in the inverse filtering mode. this is valid only during perfect filtering mode. pbf : pass bad frames. when set, all incoming frames that passed the address filtering are received, including runt frames, collided frames, or truncated frames caused by buffer underflow. hpfm : hash/perfect filtering mode. when reset, the address check block does a perfect address filter of incoming frames according the address specified in the mac address register. when set, the address check block does imperfect address filtering of multicast incoming frames according to the hash table specified in the multicast hash table register. if the hash om type 2?b00 normal. no feedback 2?b01 internal. through mii 2?b10 external. through phy 2?b11 reserved.
SPEAR-07-NC03 6 blocks description 55/194 only (ho) is set, then physical addresses are im perfect filtered too. if hash only bit(ho) is reset, then physical addresses are perfect address filtered according to the mac address register. lcc : late collision control. when set, enables the retransmissi on of the collided frame even after the collision period (late collision). when lc is rese t, the mac110 core disables the frame transmission on a late collision. in any case t he late collision status is appropriately updated in the transmit packet status. dbf : disable broadcast frames. when set, disables the reception of broadcast frames. when reset, forwards all the broadcast frames to the memory. drty : disable retry. when set, the mac will attemp t only one transmission. when a collision is seen on the bus, the mac will ignore the curren t frame and goes to the next frame and a retry error is reported in the transmit status. when drty is reset, the mac will attempt 16 transmissions before signaling a retry error. astp : automatic pad stripping. w hen set the mac will strip the pa d field on all the incoming frames if the length field is less than 46 bytes. the fcs field will also be stripped since it is computed at the transmitting st ation based on the dat a and pad field char acters, and will be invalid for a received frame that has had the pad characters stripped. receive frames which have a length field of 46 bytes or greater will be pass ed to the host unmo dified (fcs is not stripped). when reset, the ma c will pass all the incoming frames to the host unmodified. bolmt : backoff limit. the bolmt bits allow the user to set its back off limit in a relaxed or aggressive mode. according to ieee 802.3, the ma c110 has to wait for a random number [r] of slot-times** after it de tects a collision, where: 0 < r < 2k the number k is dependent on how many times the current frame to be transmitted have been retried, as follows: k= min(n,10) eq. 1 where n is the current number of retries. if a frame has been retried for 3 times, then k = 3 and r= 8 slot-times maximum if it has been retried for 12 times, then k = 10, and r = 1024 slot-times maximum. a lfsr (linear feedback shift register) 20-bit counter is used to emulate a 20bit random number generator from which r is obtained. on ce a collision is detect ed, the number of the current retry of the current frame is used to obta in k (eq.2). this value of k translates into the number of bits to use from the lfsr counter. if the value of k is 3, the mac100 will take the value in the first 3 bits of the lfsr counter, and use it to count down till zero on every slot- time. this will effectively causes the mac110 to wait 8 slot-times. to add more flexibility to the user the value of the bolmt will force the number of bits to be used from the lfsr counter to a predetermined value as in the table below. bolmt value # bits used from lfsr counter 2?b00 10 2?b01 8 2?b10 4 2?b11 1
6 blocks description SPEAR-07-NC03 56/194 thus if the value of k = 10, then the mac110 will look at th e bolmt if it is 00 then it will use the lower 10bits of the lfsr counter for the wait countdown. if bolmt is 10 th en it will only use the value in the first 4bits for the wait countdown, and so on? **slot-time = 512 bit times. dc : deferral check. when dc is set, the deferral check is enab led in the mac. the mac will abort the transmission attempt if it has deferred for more than 24,288 bit times. deferring starts when the transmitter is ready to transmit, but is prevented from doing so because crs is active. defer time is not cumulative. if the transmitte r defers for 10,000 bit times, then transmits, collides, backs off, and then has to defer again after completion of backoff, the deferral timer resets to 0 and restarts. when reset, the deferral check is disabled in the mac and the mac defers indefinitely. te : transmitter enable. when set, the mac's transmitter is enable d and it will transmit frames from the buffer on to the cable. when reset, the mac's transmitter is disa bled and will not transmit any frames. re : receiver enable. when set, the mac's receiver is enabled and will receive frames from the mii interface. when reset, the mac's receiver is disabled and will not receive any frames from the mii interface. 6.2.4.21 mac address high register mnemonic : mac_addh address : 0x3000_3404 default value : 0x0000_ffff the mac address hi register contains the upper 16 bits of the physical address of the mac. the contents of this register are normally lo aded from the eeprom at power on through the eeprom controller. paddr[47:32] : upper 16 bits (47:32) of the physical address of this mac device. bit field name access 31 - 16 reserved ro 15 - 00 paddr[47:32] rw
SPEAR-07-NC03 6 blocks description 57/194 6.2.4.22 mac address low register mnemonic : mac_addl address : 0x3000_3408 default value : 0xffff_ffff the mac address low register contains the lower 32 bits of the physical address of the mac. the contents of this register are normally lo aded from the eeprom at power on through the eeprom controller. paddr[31:00] : lower 32 bits (31:00) of the physical address of this mac device. 6.2.4.23 mac multi cast hash table high register mnemonic : mac_mchth address : 0x3000_340c default value : 0x0000_0000 6.2.4.24 mac multi cast hash table low register mnemonic : mac_mchtl address : 0x3000_3410 default value : 0x0000_0000 the 64-bit multicast table is used for group addres s filtering. for hash f iltering, the contents of the destination address in the incoming frame is passed through the crc logic and the upper 6 bits of the crc register are used to index the c ontents of the hash table. the most significant bit determines the register to be used (hi/low), wh ile the other five bits determine the bit with in the register. a value of '00000' selects the bit 0 of the selected register and a value of '11111' selects the bit 31 of the selected register. if the co rresponding bit is '1', then the multicast frame is accepted else it is rejected. if the pass all multicast is set, then all multi-cast frames are accepted regardless of the multi-cast hash values. bit field name access 31 - 00 paddr[31:00] rw bit field name access 31 - 00 htable[63:32] rw bit field name access 31 - 00 htable[31:00] rw
6 blocks description SPEAR-07-NC03 58/194 6.2.4.25 mii address register mnemonic : mac_addr address : 0x3000_3414 default value : 0x0000_0000 the mii address register is used to contro l the management cycles to the external phy controller chip. phy_add : phy address. these bits tell which of the 32 possible phy devices are being accessed mii_reg : mii register. these bits select the desired mii register in the selected phy device. mii_wr : mii write. setting this bit tells the phy that this will be a write operation using the mii data register. if this bit is not se t, this will be a read operation, placing the data in the mii data register. mii_busy : mii busy. this bit should read a logic 0 before writing to the mii address and mii data registers. this bit must also be set to 0 du ring write to the mii address register. during a mii register access, this bit will be then set to signify th at a read or write ac cess is in progress. the mii data register should be kept valid until the mac clears this bit during a phy write operation. the mii data register is invalid until the mac has cleared it during a phy read operation. the mii address r egister should not be written to until this bit is cleared. 6.2.4.26 mii data register mnemonic : mac_data address : 0x3000_3418 default value : 0x0000_0000 the mii data register contains the data to be written to the phy register specified in the mii address register, or it contains the read data from the phy register whose address is specified in the mii address register. mii_data : this contains the 16-bit value read from the phy after a mii read operation or the 16-bit data value to be written to the phy before a mii write operation. bit field name access 31 - 16 reserved ro 15 ? 11 phy_add rw 10 - 06 mii_reg rw 05 - 02 reserved ro 01 mii_wr rw 00 mii_busy rw bit field name access 31 - 16 reserved ro 15 ? 00 mii_data rw
SPEAR-07-NC03 6 blocks description 59/194 6.2.4.27 flow control register mnemonic : fcr address : 0x3000_341c default value : 0x0000_0000 this register is used to control the generation and reception of the control (pause command) frames by the mac's flow control block. a write to register with busy bit set to '1' triggers the flow control block to generate a control frame. the fields of the control frame are selected as specified in the 802.3x specification and pauset ime value from this register is used in the "pause time" field of the control frame. the busy bit is set until the control frame is transferred onto the cable. the host has to make sure th at the busy bit is cleared before writing the register. the pass control frames bit indicates the mac whether to pass the control frame to the host or not and flow control enable bit en ables the receive portion of the flow control block. ptime : pause time. this field tells the value that is to be used in the pause time field in the control frame. pcf : pass control frames. when set, the control frames are passed to the host. the mac110 core will decode the control fram e (pause), disables the transmit ter for the specified amount of time. the control frame bit in the receive status (bit 25) is set and transmitter pause mode signal indicates the current state of the mac transmitter. when reset, the mac110 co re will decode the control frames but will not pass the frames to the host. the control frame bit in the receive status (bit 25) will be set and the transmitter pause mode signal gives the current status of the transmitter, but the packet filter bit in the receive status is reset indication the application to flush the frame. fce : flow control enable. when set, the mac is ena bled for operation and it will decode all the incoming frames for control frames. when the mac receives a valid control frame (pause command), it will disable the tran smitter for the specified time. when reset, the operation in the mac is disabled and the mac does not decode the frames for control frames. note: flow control is applicable when the mac110 is set in full duplex mode. in half duplex mode, this bit will enable using backpressure to control flow of transmitted frames to the mac110. fcb : flow control busy. this bit should read a logic 0 before writing to the flow control register. to initiate a pause control frame the host must set this bit to '1'. during a transfer of control frame, this bit will continue to be set to signify that a frame transmission is in progress. after the completion of the transmission of the pause control frame, the mac will reset to '0'. the flow control register should not be written to until this bit is cleared. bit field name access 31 - 16 ptime rw 15 - 03 reserved ro 02 pcf rw 01 fce rw 00 fcb rw
6 blocks description SPEAR-07-NC03 60/194 6.2.4.28 vlan1 tag register mnemonic : vlan1 address : 0x3000_3420 default value : 0x0000_ffff this register contains the vlan tag field to identify the vlan1 frames. the mac compares the 13th and 14th bytes of the incoming frame field and if a match is found, it sets the vlan1 bit in the rx-status (bit 22) register. the legal length of the frame is increased from 1518 bytes to 1522 bytes. vlan1_tag : this contains the vlan tag field to i dentify the vlan1 frames. this field is compared with the 13th and 14th bytes of the incoming frames for vlan1 frame detection. 6.2.4.29 vlan2 tag register mnemonic : vlan2 address : 0x3000_3424 default value : 0xffff_ffff this register contains the vlan tag field to identify the vlan2 frames. the mac compares the 13th and 14th bytes of the incoming frame field and if a match is found, it sets the vlan2 bit in the rx-status register (bit 23). the legal length of the frame is increased from 1518 bytes to 1522 bytes. vlan2_tag : this contains the vlan tag field to i dentify the vlan2 frames. this field is compared to the 13th and 14th bytes of the incoming frames for vlan2 frame detection. bit field name access 31 - 16 reserved ro 15 - 00 vlan1_tag rw bit field name access 31 - 16 reserved ro 15 - 00 vlan2_tag rw
SPEAR-07-NC03 6 blocks description 61/194 6.2.4.30 mmc control register mnemonic : mmc_ctrl_reg address : 0x3000_3500 default value : 0x0000_2f72 this register establishes the operating mode of the management counters. max_frm_size : these bits indicate the value of the maximum packet size for the transmitted frames to be counted as long frames. reset_on_read : when set the counter will be reset to 0 after read. cntr_roll_over : when set, counters after reaching the maximum value start again from 0. cntr_reset : when set, all counters will be reset to 0. 6.2.4.31 mmc interr upt high register mnemonic : mmc_int_hi_reg address : 0x3000_33504 default value : 0x0000_0000 bit field name access 31 ? 14 reserved ro 13 ? 03 max_frm_size rw 02 reset_on_read rw 01 cntr_roll_over rw 00 cntr_reset wo bit field name access 31 ? 12 reserved ro 11 tx_exc_defer_frms rw 10 tx_crs_error_frms rw 09 tx_aborted_frms rw 08 tx_late_col_frms rw 07 tx_deferred_frms rw 06 tx_mul_col_frms rw 05 tx_single_col_frms rw 04 tx_bad_frms rw 03 tx_fifo_und_frms rw 02 tx_broadcast_frms rw 01 tx_multicast_frms rw 00 tx_unicast_frms rw
6 blocks description SPEAR-07-NC03 62/194 the mmc interrupt register main tains the interrupt generated due to the counters reaching half of their maximum value. 6.2.4.32 mmc interrupt low register mnemonic : mmc_int_lo_reg address : 0x3000_3508 default value : 0x0000_0000 bit field name access 31 tx_1024_to_max_frms rw 30 tx_512_to_1023_frms rw 29 tx_256_to_511_frms rw 28 tx_128_to_255_frms rw 27 tx_65_to_127_frms rw 26 tx_64_bytes_frms rw 25 tx_good_transm_bytes rw 24 tx_transm_bytes rw 23 tx_cntrl_frms rw 22 tx_transm_frms rw 21 rx_eth_frms rw 20 rx_len_err_frms rw 19 rx_dribble_err_frms rw 18 rx_crc_err_frms rw 17 rx_long_frms rw 16 rx_runt_frms rw 15 rx_fifo_err_frms rw 14 rx_broadcast_frms rw 13 rx_multicast_frms rw 12 rx_unicast_frms rw 11 rx_1024_to_max_frms rw 10 rx_512_to_1023_frms rw 09 rx_256_to_511_frms rw 08 rx_128_to_255_frms rw 07 rx_65_to_127_frms rw 06 rx_64_bytes_frms rw 05 rx_good_num_bytes rw 04 rx_num_bytes rw 03 rx_unsup_cntrl_frms rw
SPEAR-07-NC03 6 blocks description 63/194 the mmc interrupt register main tains the interrupt generated due to the counters reaching half of their maximum value. 6.2.4.33 mmc interr upt mask registers mnemonic : mmc_int_msk_hi_reg, mmc_int_msk_lo_reg address : 0x3000_350c, 0x3000_3510 default value : 0x0000_0000, 0x0000_0000 the mmc interrupt mask register s maintain the masks for the in terrupt generated due to the counters reaching half of their maximum value. (msb of the counter is set). 6.2.5 programming the dma mac 6.2.5.1 the ethernet frame format figure 4. ethernet frame format figure 5. ieee802.3 frame format the following is a description of what information the dma mac layer needs to be provided when sending frames on the lan cable (see figure 4 and figure 5 ) ? destination address (6 bytes): this field is the 48-bit standard format addre ss of the device for whish this frame is intended. ? source address (6 bytes): this field is the 48-bit standard format add ress of the device which is sending this frame. ? data (46-1500 bytes): this field is the real content of the frame. it contains headers of the protocols above (like ieee802.2 llc/snap and tcp/ip) and data. note that it must be at least 46 bytes long to have as a minimum of 64 bytes complete bit field name access 02 rx_cntrl_frms rw 01 rx_good_frms rw 00 rx_num_frms rw preamble 7 bytes sfd 1 byte dst addr 6 bytes src addr 6 bytes length 2 bytes data 46 ? 1500 bytes fcs 4 bytes preamble 7 bytes sfd 1 byte dst addr 6 bytes src addr 6 bytes length 2 bytes data 46 ? 1500 bytes fcs 4 bytes preamble 7 bytes sfd 1 byte dst addr 6 bytes src addr 6 bytes type 2 bytes data 46 ? 1500 bytes fcs 4 bytes preamble 7 bytes sfd 1 byte dst addr 6 bytes src addr 6 bytes type 2 bytes data 46 ? 1500 bytes fcs 4 bytes input to mac layer automatically added by mac layer
6 blocks description SPEAR-07-NC03 64/194 frames on the cable. this is done to guar antee the collisio n condition dete cted before the packet transmission ends, even with a cable as long as the maximum cable length allowed by the ieee specification. however, since a zero-pad can be (depending on dis_padding bit in tx_dma_start register) automatically added by the dma mac when the minimum length constrain is not reached, the user doesn't needs to pay attention to it. the following fields are automatically added by the dma mac layer before sending the frame (see figure 4 and figure 5 ) ? preamble (7 bytes): this field is used to synchronize the receiver with the frame timing. ? start frame delimiter (1 byte): this field indicates the start of a frame. ? frame check sequence (4 bytes): this field represents the crc32 value of all the data provided by the dma mac user. it is used by the receiver to check if the frame has been corrupted during the transmission on the line. the fcs field can be provided by the sw, together with the data: in this ca se the mac logic will be requested, via the ad d_crc_dis bit in the tx_dma_start register, to do not generate it again. on the other side, when the dma mac is receiving the frame from the lan, it will download to the main memory the following field contents: ? destination address (6 bytes) ? source address (6 bytes) ? type or length (2 bytes) ? data (46 - 1500 bytes) ? fcs (4 bytes) 6.2.5.2 the dma descriptor chain figure 6. dma descriptor chain the descriptor list is the mean the cpu and the dma mac use to communicate each other in order to transmit and receive frames on the cable. this list must be properly prepared before dma_cntrl dma_cntrl dma_cntrl dma_addr dma_addr dma_addr dma_next dma_next dma_next tx/rx_stat us tx/rx_stat us tx/rx_stat us descr 1 (4 x 4 bytes) descr 2 (4 x 4 bytes) descr n (4 x 4 bytes) . . . frame 0 frame 1 frame n dma_cntrl dma_cntrl dma_cntrl dma_addr dma_addr dma_addr dma_next dma_next dma_next tx/rx_stat us tx/rx_stat us tx/rx_stat us descr 1 (4 x 4 bytes) descr 2 (4 x 4 bytes) descr n (4 x 4 bytes) . . . frame 0 frame 1 frame n
SPEAR-07-NC03 6 blocks description 65/194 initiating any transfer activity to or from the cable (see figure 6 ). the descriptor is produced by the cpu and consumed by the dma mac. a descriptor is a 16-bytes element which provides the dma mac with information about how to transmit or receive a single frame and how to report the transfer status back to the cpu. a descriptor can be stored in any main memory location with a 32 bit aligned address. the first 3 words stored in a descriptor are expe cted to be values of the 3 dma mac registers describing a dma transfer (dma_cntl, dma_addr and dma_next), while the fourth, related to the transmit/receive packet status, has the descriptor valid bit as bit #16. when the dma mac fetches a descriptor it loads this three values into its own corresponding registers and checks the valid bit value. all the bits (except #16 - valid bit) of the last word are to be used by the dma mac to report the transfer status. its format should match the specification of the transmit packet status and receive packet status of the mac110 core user manual with the minor changes reported in the following. the following is the descriptor format in c language notation: { int dma_cntl; //input-output int dma_addr; //input int dma_next; //input int txrx_status; //output }; 6.2.5.3 the descriptor control bits the descriptor keeps information about a single frame transfer and how to access to the next descriptor. the following discussion is related to 3 bits of the descriptor: the valid bit, the nxt_en bit and the npol_en bit. the descriptor can be accessed simultaneously by the cpu and the dma mac. this concurrent access is synchronized by the valid bit in the receive/transmit status register. when the valid bit is equal to 0 then the cpu is the owner of the descriptor. otherwise the owner is the dma mac. since the descriptor can be accessed in write mode by the owner at any time, race conditions are guaranteed to never happen. the nxt_en bit enables the fetch of the next descriptor. when the dma mac finds this bit set to 0 then the activity is considered to be co mpleted as soon as the current descriptor dma transfers have been completed. the npol_en bit enables the dma mac to keep polling for a non valid descriptor until its valid bit become true (set to 1). when the dma mac finds both the npol_en bit and the vald bit set to 0 then its activity is considered to be completed. 6.2.5.4 transfer status the transfer status returned by the dma mac is based on the tx/rx packet status defined by the mac110 core. nevertheless the bits definition has been a slightly changed: the 16th bit is now the valid bit for both the status fields, and the frame to long bit has been moved from the 16th to the 13th position.
6 blocks description SPEAR-07-NC03 66/194 transfer interrupts the dma mac can interrupt the cpu with three different levels of information about transfer completion. the cpu can choose which interrupt needs to be enabled. they do not exclude each other though; they can be all three enabled at the same time. the tx_curr_done (rx_curr_done) interrup t bit reports the cpu when a single descriptor (i.e. one frame) has been completely treated by the dma mac and the cpu is again the owner (valid bit is set to 0). the tx_next (rx_next) interrupt bit is set when next descriptor fetch is enabled (nxt_en set to 1 in the current de scriptor) but the next descriptor is not valid (valid bit is set to 0). the tx_done (rx_done) interrupt bit is set wh en a whole dma transfer is complete. this can happens either when the current is the last de scriptor in the chain (nxt_en is set to 0) or when the next descriptor is not valid yet (valid bit set to 0) and the polling bit is disabled (npol_en set to 0). 6.2.5.5 frame transmission (tx) when the cpu wants to transmit a set of frames on the cable, it needs to provide the dma mac with a descriptor list. the cpu is expected to allocate a descriptor for each frame it wants to send, to fill it with the dma control informat ion and the pointer to t he frame and to link the descriptor in the chain (see figure 6 ). the frames will be sent on the cable in the same order they are found on the chain. 6.2.5.6 open list approach the simplest way to construct a descriptor chain is the open list approach. every descriptor but the last one will have the dma_ne xt field pointing to the next descriptor in the chain, the nxt_en bit and the valid bit on, the npol_en bit on or off. the last descriptor will e set in the same way except for the nxt_en bit (off) and the dma_next field (null). the cpu starts the dma activity loading the physic al location of the firs t descriptor into the dma_next register of the dma mac and then set the dma_start resister enable bit to on. the dma mac will then keep fetchi ng the descriptors one by one until it finds the nxt_en bit set to off (last descriptor in the chain). every ti me it completes a descriptor (frame) it saves the transfer status into txrx_status, it turns the descriptor valid bit to off and rises the tx_curr_done interrupt bit. when the nxt_en bit is found to be off, that means the dma mac has fetched the last descriptor in the chain. when it completes also this descriptor (the end of the dma transfer) it raises both the tx_curr_done an d the tx_done interrupt bits. closed list approach the approach above is easy since it doesn't require the dma mac and the cpu to synchronize their access to the descriptor chain. the problem is that requires the cpu to build the list every time it needs a transfer. a faster way to operate is building a closed descriptor list only the first time and using the valid bit to mark the end of the transfer. even more the polling facility could be used to save the cpu from the activity of programming the dm a_start register every time it needs to start the dma transfer. instead, the dma_start regist er will be activated on ly once and the dma mac will keep polling the invalid descriptor, rais ing each time the tx_next interrupt bit (if
SPEAR-07-NC03 6 blocks description 67/194 enabled), until the cpu finally sets its valid bit to on. since the dma transfer practically never ends, note that in this case the tx _done interrupt bit is never raised. with this approach every descr iptor will have the dma_next field pointing to the next descriptor in the chain (the last one will po int the first one), the nxt_en bit, the valid bit and the npol_en bit on. the dma mac will keep fetching the descriptor one by one until it finds one with its valid bit set to 0. every time the dma mac completes a descriptor (frame) it saves the transfer status into the txrx_status, ot turns its valid bit to off and raises the tx_curr_done interrupt bit. 6.2.5.7 frame reception (rx) the frame reception process is something that ne eds to be activated at the beginning and kept always running. for this reason the closed descriptor list (see above) is much more useful than the open list approach. again, with this approach every descriptor will have the dma_next field pointing to the next descriptor in the chain (the last one will po int to the first one), the nxt_en bit, the valid bit and the npol_en bit on. the cpu starts the transfer activity loading t he dma next register of the dma mac with the physical location of the first descriptor and sets the dma_start register enable bit to on. the dma mac will start fetching the descriptors one by one, driven by the frame reception from the line. every time the dma mac completes a descripto r (frame) it saves the transfer status into the txrx_status, it turns its vald bit to off and raises the rx_curr_done interrupt bit. eventually, if the dma mac will be faster then the cpu, it will wrap around the descriptor chain finding a descriptor still invalid. then the dma mac keeps polling the invalid de scriptor, raising each time the rx_next interrupt bit (if enabled), until some descriptors gets available (note that in this case some frame could be lost). in the meantime the cpu should consume the frames received and set the valid bit to on of all the descriptor released. as soon as the dma finds the descriptor valid again , it will be able to co mplete the transfer and fetch the next descriptor.
6 blocks description SPEAR-07-NC03 68/194 6.3 full-speed usb host controller figure 7. usb host controller block diagram 6.3.1 overview the usb interface integrated into the spear net device is an full-speed usb controller and is compliant with the usb1.1 standard and openhci (open host controller interface) rev.1.0 compatible. spear net supports both, low and full speed usb devices. the open host controller interface (openhci) sp ecification for the universal serial bus is a register-level description of a host controller for the universal serial bus (usb) which in turn is described by the universal serial bus specification. the purpose of openhci is to accelerate the acceptance of usb in the marketplace by promoting the use of a common industry software /hardware interface. op enhci allows multiple host controller vendors to design and sell host controllers with a common software interface, freeing them from the burden of writ ing and distributing software drivers. hci slave block hci master block wrapper list processor block root hub & host sie usb state control status ahb master apb slave 64x8 fifo cntl 64x8 fifo root hub config block ohci root hub regs. ed&td regs control control ohci regs tx rcv control control control usb
SPEAR-07-NC03 6 blocks description 69/194 figure 8. usb focus areas figure 8 shows four main focus areas of a universa l serial bus (usb) system. these areas are the client software/usb driver, host controller driver (h cd), host controller (hc), and usb device. the client software/usb device and host controller driver are implemented in software. the host controller and usb device are implemented in hardware. openhci specifies the interface between the host controller driver and the host controller and the fundamental operation of each. the host controller driver and host controller work in tandem to transfer data between client software and a usb device. data is translated from shared-memory data structures at the clientsoftware end to usb si gnal protocols at the usb device end, and vice-versa. figure 7 shows the block diagram of the protoc ols at the usb the spear net usb (hc) contains a set usb host controller. the integrated usb host controlle r (hc) contains a set of on-c hip operational registers which are mapped into the noncacheable portion of the system addressable space. these registers are used by the host controller driver (hcd). according to the function of these registers, they are divided into four partitions, specifically for control and status, memory pointer, frame counte r and root hub. all of the registers should be read and written as dwords. reserved bits may be allocated in future releases of this specification. to ens ure interoperability, the host controller driver that does not use a reserved field should not assume that the reserved field contains 0. furthermore, the host controller driver should always preserve the value(s) of the reserved field. when a r/w register is modified, the host controller driver should first re ad the register, modify the bits desired, then write the register with the rese rved bits still containing the read value. alternatively, the host controller driver can maintain an in-memory copy of previously written values that can be modified and then written to the host controller re gister. when a write to set/clear register is written, bits written to reserved fields should be 0. 6.3.2 host controller management the host controller (hc) is first managed th rough a set of operational registers. these registers exist in the host controller and ar e accessed using memory references via a noncached virtual pointer. all host controller operational registers start with the prefix hc .
6 blocks description SPEAR-07-NC03 70/194 the hchcca is filled in by software a nd points the host controller at the block of shared ram called the host controller comm unication area (hcca). all fiel ds within the hcca start with the prefix hcca . 6.3.3 initialization of the hci there are a number of steps necessary for an os to bring its host controller driver to an operational state: load host controller driver and locate the hc verify the hc and allocate system resources take control of hc (support for an optional system management mode driver) set up hc registers and hc communications area begin sending sof tokens on the usb note: due to some devices on the usb that may take a long time to reset, it is desirable that the host controller driver start-up process not transiti on to the usbreset state if at all possible. 6.3.4 operational states the operational states of the host controlle r are defined by their effect on the usb: u sb op erational u sb r eset u sb r esume u sb s uspend 6.3.4.1 u sb r eset when the host controller enters this state, most of the operational registers are ignored by the host controller and need not contain any meanin gful values; however, the contents of the registers (except root hub registers) are preser ved by the hc. the obvious exception is that the host controller uses the hccontrol register which contains the hostcontrollerfunctionalstate . while in this state, the root hub is being reset, which causes the root hub's downstream ports to be reset and possibly powered off. this state must be maintained for the minimum time specified in the usb specification for the assert ion of reset on the usb. only the following interrupts are possible while the host controller is in the usbreset state: ownershipchange . 6.3.4.2 u sb o perational this is the normal state of the hc . in this state, the host contro ller is generating sof tokens on the usb and processing the various lists that are enabled in the hccontrol register. this allows the clients of the host controller driver, usbd and above, to communicate with devices on the usb. the host controller generates the first so f token within one ms of the time that the usboperational state is entered (if the host controller driver wants to know when this occurs, it may enable the startofframe interrupt). all interrup ts are possible in the usboperational state, except resumedetected .
SPEAR-07-NC03 6 blocks description 71/194 6.3.4.3 u sb s uspend in this state, the host controller is not generati ng sof tokens on the usb; nor is it processing any lists that may be enabled in the hccontrol register. in fact, the host controller ignores most of the operational registers which need not contain any meaningful values; however, the host controller does preserve their values. while in th is state, the host controller monitors the usb for resume signalling, and if detected, changes the state to usbresume. because of this, there is a restriction on how the host cont roller driver may modify the contents of hccontrol while in the usbsuspend state: host controller driver may only write to hccontrol with the hostcontrollerfunctionalstate field set to either usbreset or usbresume (see exception). openhci - open host controller interface specification for usb after a certain length of time without sof tokens, devices on the usb enter the suspend state. normally, the host controller driver must ensure that the host controller stays in this state for at least 5 ms and then exits this state to ei ther the usbresume or the usbreset state. an exception is when this state is entered due to a software reset and the previous state was not usbsuspend, in which case, if the host co ntroller remains in the usbsuspend state for less than 1 ms, it may exit directly to usboperat ional (the timing of less than 1 ms ensures that no device on usb attempts to initiate resume signalling and thus the host controller does not attempt to modify hccontrol ). the only interrupts possible in the usbsuspend state are resumedetected (the host controller will have changed the hostcontrollerfunctionalstate to the usbresume state) and ownershipchange . 6.3.4.4 u sb r esume while the host controller is in the usbresume state, it is asserting resu me signalling on the usb; as a result, no tokens are generated and the host controller does not process any lists that may be enabled in the hccontrol register. in fact, most of the operational registers are ignored and need not contain any meaningful values; however, the host controller does preserve their values. this state must be maintained for the minimum time specified in the usb specification for the assertion of resume on the usb. the only interrupt possible in the usbresume state is ownershipchange . for more details please refer to the openhci interface specification for usb in chapter 8) reference documents
6 blocks description SPEAR-07-NC03 72/194 6.3.5 operational registers mapping table 12. usb host controller operational register map address register name description 0x3000_2c00 hcrevision revision field read only 0x3000_2c04 hccontrol usb host controller operating mode 0x3000_2c08 hccommandstatus used by the host controller to receive commands issused by the host controller driver 0x3000_2c0c hcinterruptstatus register provides status on various events that cause hardware interrupts 0x3000_2c10 hcinterruptenable register is used to control which events generate a hardware interrupt 0x3000_2c14 hcinterruptdisable to clear the corres ponding bit in the hcinterruptenable register 0x3000_2c18 hchcca register contains the physical ad dress of the host controller communication area 0x3000_2c1c hcperiodcurrented register contains the physica l address of the current isochronous or interrupt endpoint descriptor 0x3000_2c20 hccontrolheaded register contains the physical address of the first endpoint descriptor of the control list 0x3000_2c24 hccontrolcurrented register contains the physical address of the current endpont descriptor of the control list 0x3000_2c28 hcbulkheaded register contains the physical address of the first endpoint descriptor of the bulk list 0x3000_2c2c hcbulkcurrented register contains the physical address of the current endpoint of the bulk list. as the bulk list will be served in a round-robin fashion, the endpoints will be ordered according to their insertion to the list. 0x3000_2c30 hcdonehead contains the physical address of the last completed transfer descriptor that was added to the done queue. 0x3000_2c34 hcfminterval register contains a 14-bit value which indicates the bit time interval in a frame, and a 15-bit value indicating the full speed maximum packet size that the ho st controller may carry out. 0x3000_2c38 hcfmremaining register is a 14-bit down counter showing the bit time remaining in the current frame 0x3000_2c3c hcfmnumber register is a 16-bit counter providein a reference among events happening in the host controller and the host controller driver 0x3000_2c40 hcperiodicstart register has a 14-bit programmable value which determines when is the earliest time hc should start processing the periodic list. 0x3000_2c44 hclsthreshold register contains an 11-bit value used by the host controller to determine whether to commit to the transfer of a maximum of 8- byte ls packet before eof. 0x3000_2c48 hcrhdescriptora register (first of 2) describes the characteri stics of the root hub 0x3000_2c4c hcrhdescriptorb register (second of 2) describes the characteristic of the root hub 0x3000_2c50 hcrhstatus register represents the hub status field (lower word of dword) and the hub status change field (upper word of dword) 0x3000_2c54 hcrhportstatus[1: ndp] register [1:ndp] is used to control and report port events on a per-port basis. ?? 0x3000_2c54+4*ndp hcrhportstatus[ndp] ?
SPEAR-07-NC03 6 blocks description 73/194 6.3.6 register description all the registers are 32 bit wide. 6.3.6.1 hcrevision register mnemonic : address : 0x3000_2c00 6.3.6.2 hccontrol register address : 0x3000_2c04 bit field name reset read/write description hcd hc 31 - 08 rev 10 r r revision this read-only field contains the bcd representation of the version of the hci specification that is implemented by this hc. for example, a value of 11h corresponds to version 1.1. all of the hc implementations that are compliant with this specification will have a value of 10h. 07 - 00 reserved i bit field name root hub reset read/write description hcd hc 31 - 11 reserved 10 rwe 0b rw r remotewakeupenable this bit is used by hcd to enable or disable the remote wakeup feature upon the detection of upstream resume signaling. when this bit is set and the resumedetected bit in hcinterruptstatus is set, a remote wakeup is signaled to the host system. setting this bit has no impact on the generation of hardware interrupt. 09 rwc 0b rw rw remotewakeupconnected this bit indicates whether hc supports remote wakeup signaling. if remote wakeup is supported and used by the system it is the responsibili ty of system firmware to set this bit during post. hc clears the bit upon a hardware reset but does not alter it upon a software reset. remote wakeup signaling of the host system is host-bus -specific and is not described in this specification.
6 blocks description SPEAR-07-NC03 74/194 08 ir 0b rw r interruptrouting this bit determines the routing of interrupts generated by events registered in hcinterruptstatus . if clear, all interrupts are routed to the normal host bus interrupt mechanism. if set, interrupts are routed to the system management interrupt. hcd clears this bit upon a hardware reset, but it does not alter this bit upon a software reset. hcd uses this bit as a tag to indicate the ownership of hc. 07 - 06 hcfs 00b rw rw hostcontrollerfunctionalstate for usb 00b: usbreset 01b: usbresume 10b: usboperational 11b: usbsuspend a transition to usboperational from another state causes sof generation to begin 1 ms later. hcd may determine whether hc has begun sending sofs by reading the startofframe field of hcinterruptstatus . this field may be changed by hc only when in the usbsuspend state. hc may move from the usbsuspend state to the usbresume state after detecting the resume signaling from a downstream port. hc enters usbsuspend after a software reset, whereas it enters usbr eset after a hardware reset. the latter also resets the root hub and asserts subsequent reset signaling to downstream ports. 05 ble 0b rw r bulklistenable this bit is set to enable the processing of the bulk list in the next frame. if cleared by hcd, processing of the bulk li st does not occur after the next sof. hc checks this bit whenever it determines to process the list. when disabled, hcd may modify the list. if hcbulkcurrented is pointing to an ed to be removed, hcd must advance the pointer by updating hcbulkcurrented before re-enabling processing of the list. bit field name root hub reset read/write description hcd hc
SPEAR-07-NC03 6 blocks description 75/194 04 cle 0b rw r controllistenable this bit is set to enable the processing of the control list in the next frame. if cleared by hcd, processing of the control list does not occur after the next sof. hc must check this bit whenever it determines to process the list. when disabled, hcd may modify the list. if hccontrolcurrented is pointing to an ed to be removed, hcd must advance the pointer by updating hccontrolcurrented before re-enabling processing of the list. 03 ie 0b rw r isochronousenable this bit is used by hcd to enable/disable processing of isochronous eds. while processing the periodic list in a frame, hc checks the status of this bit when it finds an isochronous ed (f=1). if set (enabled), hc continues processing the eds. if cleared (disabled), hc halts processing of the periodic list (which now contains only isochronous eds) and begins processing the bulk/control lists. setting this bit is guaranteed to take effect in the next frame (not the current frame). 02 ple 0b rw r periodiclistenable this bit is set to enable the processing of the periodic list in the next frame. if cleared by hcd, processing of the periodic list does not occur after the next sof. hc must check this bit before it starts processing the list. 01 - 00 cbsr 00b rw r controlbulkserviceratio this specifies the service ratio between control and bulk eds. before processing any of the nonperiodic lists, hc must compare the ratio specified with its internal count on how many nonempty control eds have been processed, in determining whether to continue serving another control ed or switching to bulk eds. the internal count will be retained when crossing the frame boundary. in case of reset, hcd is responsible for restoring this value.. bit field name root hub reset read/write description hcd hc cbsr no. of control eds over bulk eds served 01 : 1 12 : 1 23 : 1 34 : 1
6 blocks description SPEAR-07-NC03 76/194 the hccontrol register defines the opertating modes for the host controller. most of the fields in this register are modified only by the host controller driver, except hostcontrollerfunctionalstate and remotewakeupconnected . 6.3.6.3 hccommandstatus register address : 0x3000_2c08 bit field name reset read/write description hcd hc 31 - 18 reserved 17 - 16 soc 00b r rw schedulingoverruncount these bits are incremented on each scheduling overrun error. it is initialized to 00b and wraps around at 11b. this will be incremented when a scheduling overrun is detected even if schedulingoverrun in hcinterruptstatus has already been set. this is used by hcd to monitor any persistent scheduling problems. 15 - 04 reserved 03 ocr 0b rw rw ownershipchangerequest this bit is set by an os hcd to request a change of control of the hc. when set hc will set the ownershipchange field in hcinterruptstatus . after the changeover, this bit is cleared and remains so until the next request from os hcd. 02 blf 0b rw rw bulklistfilled this bit is used to indicate whether there are any tds on the bulk list. it is set by hcd whenever it adds a td to an ed in the bulk list. when hc begins to process the head of the bulk list, it checks bf. as long as bulklistfilled is 0, hc will not start processing the bulk list. if bulklistfilled is 1, hc will start processing the bulk list and will set bf to 0. if hc finds a td on the list, then hc will set bulklistfilled to 1 causing the bulk list processing to continue. if no td is found on the bulk list, and if hcd does not set bulklistfilled , then bulklistfilled will still be 0 when hc completes processing the bulk list and bulk list processing will stop.
SPEAR-07-NC03 6 blocks description 77/194 the hccommandstatus register is used by the host controller to receive commands issued by the host controller driver, as well as reflecting th e current status of the host controller. to the host controller driver, it appears to be a "write to set" register. the host controller must ensure that bits written as '1' become set in the register while bits written as '0' remain unchanged in the register. the host controller driver may is sue multiple distinct commands to the host controller without concern for corrupting previously issued commands. the host controller driver has normal read access to all bits. the schedulingoverruncount field indicates the number of frames with which the host controller has detected the scheduling overrun erro r. this occurs when the periodic list does not complete before eof. when a scheduling ov errun error is detected, the host controller increments the counter and sets the schedulingoverrun field in the hcinterruptstatus register. 01 clf 0b rw rw controllistfilled this bit is used to indicate whether there are any tds on the control list. it is set by hcd whenever it adds a td to an ed in the control list. when hc begins to process the head of the control list, it checks clf. as long as controllistfilled is 0, hc will not start processing the control list. if cf is 1, hc will start processing the control list and will set controllistfilled to 0. if hc finds a td on the list, then hc will set controllistfilled to 1 causing the control list processing to continue. if no td is found on the control list, and if the hcd does not set controllistfilled , then controllistfilled will still be 0 when hc completes processing the control list and control list processing will stop. 00 hcr 0b rw rw hostcontrollerreset this bit is set by hcd to initiate a software reset of hc. regardless of the functional state of hc, it moves to the usbsuspend state in which most of the operational registers are reset except those stated otherwise; e.g., the interruptrouting field of hccontrol , and no host bus accesses are allowed. this bit is cleared by hc upon the completion of the reset operation. the reset operation must be completed within 10 s. this bit, when set, should not cause a reset to the root hub and no subsequent reset signaling should be asserted to its downstream ports. bit field name reset read/write description hcd hc
6 blocks description SPEAR-07-NC03 78/194 6.3.6.4 hcinterruptstatus register address : 0x3000_2c0c bit field name reset read/write description hcd hc 31 0 30 oc 0b rw rw ownershipchange this bit is set by hc when hcd sets the ownershipchangerequest field in hccommandstatus . this event, when unmasked, will always generate an system management interrupt (smi) immediately. this bit is tied to 0b when the smi pin is not implemented. 29 - 07 reserved 06 rhsc 0b rw rw roothubstatuschange this bit is set when the content of hcrhstatus or the content of any of hcrhportstatus [ numberofdownstreamport ] has changed. 05 fno 0b rw rw framenumberoverflow this bit is set when the msb of hcfmnumber (bit 15) changes value, from 0 to 1 or from 1 to 0, and after hccaframenumber has been updated. 04 ue 0b rw rw unrecoverableerror this bit is set when hc detects a system error not related to usb. hc should not proceed with any processing not signalling before the system error has been corrected. hcd clears this bit after hc has been reset. 03 rd 0b rw rw resumedetected this bit is set when hc detects that a device on the usb is asserting resume signalling. it is the transition from no resume signalling to resume signalling causing this bit to be set. this bit is not set when hcd sets the usbresume state. 02 sf 0b rw rw startofframe this bit is set by hc at each start of a frame and after the update of hccaframenumber . hc also generates a sof token at the same time.
SPEAR-07-NC03 6 blocks description 79/194 this register provides status on various events that cause hardware interrupts. when an event occurs, host controller sets the corresponding bit in this register. when a bit becomes set, a hardware interrupt is generated if the interrupt is enabled in the hcinterruptenable register (see chapter 6.3.6.5) and the ma sterinterruptenable bit is set. th e host controller driver may clear specific bits in this register by writing '1' to bit positions to be cleared. the host controller driver may not set any of these bits. the host controller will never clear the bit. 6.3.6.5 hcinterruptenable register address : 0x3000_2c10 01 wdh 0b rw rw writebackdonehead this bit is set immediately after hc has written hcdonehead to hccadonehead. further updates of the hccadonehead will not occur until this bit has been cleared. hcd should only clear this bit after it has saved the content of hccadonehead . 00 so 0b rw rw schedulingoverrun this bit is set when the usb schedule for the current frame overruns and after the update of hccaframenumber . a scheduling overrun will also cause the schedulingoverruncount of hccommandstatus to be incremented. bit field name reset read/write description hcd hc 31 mie 0b rw r a ?0? written to this field is ignored by hc. a '1' written to this field enables interrupt generation due to events specified in the other bits of this register. this is used by hcd as a master interrupt enable. 30 oc 0b rw r 0 - ignore 1 - enable interrupt generation due to ownership change. 29 - 07 reserved 06 rhsc 0b rw r 0 - ignore 1 - enable interrupt generation due to root hub status change. 05 fno 0b rw r 0 - ignore 1 - enable interrupt generation due to frame number overflow. 04 ue 0b rw r 0 - ignore 1 - enable interrupt generation due to unrecoverable error. bit field name reset read/write description hcd hc
6 blocks description SPEAR-07-NC03 80/194 each enable bit in the hcinterruptenable register corresponds to an associated interrupt bit in the hcinterruptstatus register. the hcinterruptenable register is used to control which events generate a hardware interrupt. when a bit is set in the hcinterruptstatus register and the corresponding bit in the hcinterruptenable register is set and the masterinterruptenable bit is set, then a hardware interrupt is requested on the host bus. writing a '1' to a bit in this register sets the corresponding bit, whereas writing a '0' to a bit in this register leaves the corres ponding bit unchanged. on read, the current value of this register is returned. 6.3.6.6 hcinterruptdisable register address : 0x3000_2c14 03 rd 0b rw r 0 - ignore 1 - enable interrupt generation due to resume detect. 02 sf 0b rw r 0 - ignore 1 - enable interrupt generation due to start of frame. 01 wdh 0b rw r 0 - ignore 1 - enable interrupt generation due to hcdonehead writeback. 00 so 0b rw r 0 - ignore 1 - enable interrupt generation due to scheduling overrun. bit field name reset read/write description hcd hc 31 mie 0b rw r a '0' written to this field is ignored by hc. a '1' written to this field disables interrupt generation due to events specified in the other bits of this register. this field is set after a hardware or software reset. 30 oc 0b rw r 0 - ignore 1 - disable interrupt generation due to ownership change. 29 - 07 reserved 06 rhsc 0b rw r 0 - ignore 1 - disable interrupt generation due to root hub status change. 05 fno 0b rw r 0 - ignore 1 - disable interrupt generation due to frame number overflow. bit field name reset read/write description hcd hc
SPEAR-07-NC03 6 blocks description 81/194 each disable bit in the hcinterruptdisable register corresponds to an associated interrupt bit in the hcinterruptstatus register. the hcinterruptdisable register is coupled with the hcinterruptenable register. thus, writing a '1' to a bit in this register clears the corresponding bit in the hcinterruptenable register, whereas writing a '0' to a bit in this register leaves the corresponding bit in the hcinterruptenable register unchanged. on read, the current value of the hcinterruptenable register is returned. 6.3.6.7 hchcca register mnemonic : address : 0x3000_2c18 default value: the hchcca register contains the physical addre ss of the host controller communication area. the host controller driver determines the a lignment restrictions by writing all 1s to hchcca and reading the content of hchcca . the alignment is evaluated by examining the number of zeroes in the lower order bits. the minimum alignment is 256 bytes; therefore, bits 0 through 7 must always return '0' when read. detailed descri ption can be found in chapter 4. this area is used to hold the control structures and the inte rrupt table that are accessed by both the host controller and the host controller driver. 04 ue 0b rw r 0 - ignore 1 - disable interrupt generation due to unrecoverable error. 03 rd 0b rw r 0 - ignore 1 - disable interrupt generation due to resume detect. 02 sf 0b rw r 0 - ignore 1 - disable interrupt generation due to start of frame. 01 wdh 0b rw r 0 - ignore 1 - disable interrupt generation due to hcdonehead writeback. 00 so 0b rw r 0 - ignore 1 - disable interrupt generation due to scheduling overrun. bit field name read/write description hcd hc 31 - 08 hcca r/w r base address of the host controller communication area 07 - 00 0 bit field name reset read/write description hcd hc
6 blocks description SPEAR-07-NC03 82/194 6.3.6.8 hcperiodcur rented register mnemonic : address : 0x3000_2c1c default value : the hcperiodcurrented register contains the physical addre ss of the current isochronous or interrupt endpoint descriptor. 6.3.6.9 hccontrolheaded register mnemonic : address : 0x3000_2c20 default value: the hccontrolcurrented register contains the physical address of the current endpoint descriptor of the control list. bit field name read/write description hcd hc 31 ? 04 pced r rw periodcurrented this is used by hc to point to the head of one of the periodic of lists which will be processed in the current frame. the content of this register is updated by hc after a periodic ed has been processed. hcd may read the content in determining which ed is currently being processed at the time of reading. 03 ? 00 0 bit field name read/write description hcd hc 31 ? 04 cced r rw controlcurrented this pointer is advanced to the next ed after serving the present one. hc will contin ue processing the list from where it left off in the last frame. when it reaches the end of the control list, hc checks the controllistfilled of in hccommandstatus . if set, it copi es the content of hccontrolheaded to hccontrolcurrented and clears the bit. if not set, it does nothing. hcd is allowed to modify this register only when the controllistenable of hccontrol is cleared. when set, hcd only reads the instantaneous value of this regis ter. initially, this is set to zero to indicate the end of the control list. 03 ? 00 0
SPEAR-07-NC03 6 blocks description 83/194 6.3.6.10 hcbulkheaded register mnemonic : address : 0x3000_2c28 default value: the hcbulkheadted register contains the physical address of the first endpoint descriptor of the bulk list. 6.3.6.11 hcbulkcurrented register address : 0x3000_2c2c the hcbulkheadted register contains the physical address of the current endpoint of the bulk list. as the bulk list will be se rved in a round-robin fashion, the endpoints will be ordered according to their insertion of the list. bit field name reset read/write description hcd hc 31 ? 04 bhed 0h r/w r bulkheaded hc traverses the bulk list starting with the hcbulkheaded pointer. the content is loaded from hcca during the initialization of hc. 03 ? 00 0 bit field name reset read/write description hcd hc 31 ? 04 bced 0h r/w r/w bulkcurrented this is advanced to the next ed after the hc has served thepresent one. hc continues processing the list from where it left off in the last frame. when it reaches the end of the bulk list, hc checks the controllistfilled of hccontrol. if set, it copies the content of hcbulkheaded to hcbulkcurrented and clears the bit. if it is not set, it does nothing. hcd is only allowed to modify this register when the bulklistenable of hccontrol is cleared. when set, the hcd only reads the instantaneous value of this r egister. this is initially set to zero to indicate the end of the bulk list. 03 ? 00 0
6 blocks description SPEAR-07-NC03 84/194 6.3.6.12 hcdoneh ead register address : 0x3000_2c30 the hcdonehead register contains the physical addr ess of the last completed transfer descriptor that was added to the done queue. in normal operation, the host controller driver should not need to read the register as its content is periodically written to the hcca. 6.3.6.13 hcfminterval register address : 0x3000_2c34 bit field name reset read/write description hcd hc 31 ? 04 dh 0h r r/w donehead when a td is completed, hc writes the content of hcdonehead to the nexttd field of the td. hc then overwrites the content of hcdonehead with the address of this td. this is set to zero whenever hc writes the content of this register to hcca. it also sets the writebackdonehead of hcinterruptstatus 03 ? 00 0 bit field name reset read/write description hcd hc 31 fit 0b rw r frame interval toggle hcd toggles this bit whenever it loads a new value to frameinterval 30 - 16 fsmps tbd rw r fslargestdatapacket this field specifies a value which is loaded into the largest data packet counter at the beginning of each frame. the counter value represents the largest amount of data in bi ts which can be sent or received by the hc in a single transaction at any given time without causing scheduling overrun. the field value is calculated by the hcd. 15 ? 14 reserved 13 - 00 fi 2edfh rw r frameinterval this specifies the interval between two consecutive sofs in bit times. the nominal value is set to be 11,999. hcd should store the current value of this field before resetting hc. by setting the hostcontrollerreset field of hccommandstatus as this will cause the hc to reset this field to its nominal value. hcd may choose to restore the stored value upon the completion of the reset sequence.
SPEAR-07-NC03 6 blocks description 85/194 the hcfminterval register contains a 14-bit value which indicates the bit time interval in a frame, (i.e., between two consecutive sofs), and a 15-bit value indicating the full speed maximum packet size that the host controller may transmit or receive without causing scheduling overrun. the host controller driver may carry out minor adjustment on the frameinterval by writing a new value over the present one at each sof. this provides the programmability necessary for the host controller to synchronize with an external clocking resource and to adjust any unknown local clock offset. 6.3.6.14 hcfmremaining register address : 0x3000_2c38 the hcfmremaining register is a 14-bit down counter showing the bit time remaining in the current frame. 6.3.6.15 hcfmnumber register address : 0x3000_2c3c bit field name reset read/write description hcd hc 31 frt 0b r rw frameremainingtoggle this bit is loaded from the frameintervaltoggle field of hcfminterval whenever frameremaining reaches 0. this bit is used by hcd for the synchronization between frameinterval and frameremaining . 30 - 14 reserved . fr 0h r rw frameremaining this counter is decrem ented at each bit time. when it reaches zero, it is reset by loading the frameinterval value specified in hcfminterval at the next bit time boundary. when entering the usboperational state, hc re-loads the content with the frameinterval of hcfminterval and uses the updated val ue from the next sof. bit field name reset read/write description hcd hc 31 - 16 reserved 15 - 00 fn 0h r rw framenumber this is incremented when hcfmremaining is re-loaded. it will be rolled over to 0h after ffffh. when entering the usboperational state, th is will be incremented automatically. the c ontent will be written to hcca after hc has incremented the framenumber at each frame boundary and sent a sof but before hc reads the first ed in that frame. after writing to hcca, hc will set the startofframe in hcinterruptstatus.
6 blocks description SPEAR-07-NC03 86/194 the hcfmnumber register is a 16-bit counter. it provides a timing reference among events happening in the host controller and the host controller driver. the host controller driver may use the 16-bit value specified in this register and generate a 32-bit frame number without requiring frequent access to the register. 6.3.6.16 hcperiodicstart register address : 0x3000_2c40 the hcperiodicstart register has a 14-bit programmable value which determines when is the earliest time hc should start processing the periodic list. 6.3.6.17 hclsthreshold register address : 0x3000_2c44 bit field name reset read/write description hcd hc 31 - 16 reserved 15 - 00 ps 0h rw r periodicstart after a hardware reset, this field is cleared. this is then set by hcd during the hc initialization. the value is calculated roughly as 10% off from hcfminterval .. a typical value will be 3e67h. when hcfmremaining reaches the value specified, processing of t he periodic lists will have priority over control/bulk processing. hc will therefore start processing the interrupt list after completing the current control or bulk transaction that is in progress. bit field name reset read/write description hcd hc 31 - 12 reserved 11 - 00 lst 0628h rw r lsthreshold this field contains a value which is compared to the frameremaining field prior to initiating a low speed transaction. the transacti on is started only if frameremaining this field. the value is calculated by hcd with the consideration of transmission and setup overhead.
SPEAR-07-NC03 6 blocks description 87/194 6.3.6.18 hcrhdesc riptora register address : 0x3000_2c48 bit field name power on reset read/write description hcd hc 31 - 24 potpgt is rw r powerontopowergoodtime this byte specifies the duration hcd has to wait before accessing a powered-on port of the root hub. it is implementation-specific. the unit of time is 2 ms. the duration is calculated as potpgt * 2 ms. 23 - 13 reserved 12 nocp is rw r noovercurrentprotection this bit describes how the overcurrent status for the root hub ports are reported. when this bit is cleared, the overcurrentprotectionmode field specifies global or per-port reporting. 0: over-current status is reported collectively for all downstream ports 1: no overcurrent protection supported 11 ocpm is rw r overcurrentprotectionmode this bit describes how the overcurrent status for the root hub ports are reported. at reset, this fields should reflect the same mode as powerswitchingmode . this field is valid only if the noovercurrentprotection field is cleared. 0: over-current st atus is reported collectively for all downstream ports 1: over-current status is reported on a per-port basis 10 dt 0b r r devicetype this bit specifies that the root hub is not a compound device. the root hub is not permitted to be a compound device. this field should always read/write 0. 09 nps is rw r nopowerswitching these bits are used to specify whether power switching is supported or port are always powered. it is implementationspecific. when this bit is cleared, the powerswitchingmode specifies global or per-port switching. 0: ports are power switched 1: ports are always powered on when the hc is powered on
6 blocks description SPEAR-07-NC03 88/194 the hcrhdescriptora register is the first register of tw o describing the characteristics of the root hub. reset values are implementation-specifi c. the descriptor length (11), descriptor type (tbd), and hub controller current (0) fields of the hub class descriptor are emulated by the hcd. all other fields are located in the hcrhdescriptora and hcrhdescriptorb registers. 08 psm is rw r powerswitchingmode this bit is used to specify how the power switching of the root hub ports is controlled. it is implementation-specific. this field is only valid if the nopowerswitching field is cleared. 0: all ports are powered at the same time. 1: each port is powered individually. this mode allows port power to be controlled by either the global switch or perport switching. if the portpowercontrolmask bit is set, the port responds only to port power commands ( set/ clearportpower ). if the port mask is cleared, then the port is controlled only by the global power switch ( set/clearglobalpower ). 07 - 00 ndp is r r numberdownstreamports these bits specify the number of downstream ports supported by the root hub. it is implementation-specific. the minimum number of ports is 1. the maximum number of ports supported by openhci is 15. bit field name power on reset read/write description hcd hc
SPEAR-07-NC03 6 blocks description 89/194 6.3.6.19 hcrhdesc riptorb register address : 0x3000_2c4c the hcrhdescriptorb register is the second register of two describing the characteristics of the root hub. these fields are written during in itialization to correspond with the system implementation. reset values are implementation-specific. bit field name power on reset read/write description hcd hc 31 - 16 ppcm is rw r portpowercontrolmask each bit indicates if a port is affected by a global power control command when powerswitchingmode is set. when set, the port's power state is only affected by per-port power control ( set/clearportpower ). when cleared, the port is controlled by the global power switch ( set/ clearglobalpower ). if the device is configured to global switching mode ( powerswitchingmode =0), this field is not valid. bit 0: reserved bit 1: ganged-power mask on port #1 bit 2: ganged-power mask on port #2 ... bit15: ganged-power mask on port #15 15 - 00 dr is rw r deviceremovable each bit is dedicated to a port of the root hub. when cleared, the attached device is removable. when set, the attached device is not removable. bit 0: reserved bit 1: device attached to port #1 bit 2: device attached to port #2 ... bit15: device attached to port #15
6 blocks description SPEAR-07-NC03 90/194 6.3.6.20 hcrhstatus register address : 0x3000_2c50 bit field name root hub reset read/write description hcd hc 31 crwe - w r clearremotewakeupenable writing a '1' clears deviceremovewakeupenable . writing a '0' has no effect. 30 - 18 reserved 17 ocic 0b rw rw overcurrentindicatorchange this bit is set by hardware when a change has occurred to the oci field of this register. the hcd clears this bit by writing a ?1?. writing a ?0? has no effect. 16 lpsc 0b rw r (read) localpowerstatuschange the root hub does not support the local power status feature; thus, this bit is always read as ?0?. (write) setglobalpower in global power mode ( powerswitchingmode =0), this bit is written to ?1? to turn on power to all ports (clear portpowerstatus ). in per-port power mode, it sets portpowerstatus only on ports whose portpowercontrolmask bit is not set. writing a ?0? has no effect. 15 drwe 0b rw r (read) deviceremotewakeupenable this bit enables a connectstatuschange bit as a resume event, causing a usbsuspend to usbresume state transition and setting the resumedetected interrupt. 0 = connectstatuschange is not a remote wakeup event. 1 = connectstatuschange is a remote wakeup event. (write) setremotewakeupenable writing a '1' sets deviceremovewakeupenable . writing a '0' has no effect. 14 - 02 reserved
SPEAR-07-NC03 6 blocks description 91/194 the hcrhstatus register is divided into two parts. th e lower word of a dword represents the hub status field and the upper word represents the hub status change field. reserved bits should always be written '0'. 6.3.6.21 hcrhportstatus[1:ndp] register address : 0x3000_2c54 01 oci 0b r rw overcurrentindicator this bit reports overcurrent conditions when the global reporting is implemented. when set, an overcurrent condition exists. when cleared, all power operations are normal. if per-port overcurrent protection is implemented this bit is always ?0? 00 lps 0b rw r (read) localpowerstatus the root hub does not support the local power status feature; thus, this bit is always read as ?0?. (write) clearglobalpower in global power mode ( powerswitchingmode =0), this bit is written to ?1? to turn off power to all ports (clear portpowerstatus ). in per-port power mode, it clears portpowerstatus only on ports whose portpowercontrolmask bit is not set. writing a ?0? has no effect. bit field name root hub reset read/write description hcd hc 31 - 21 reserved 20 prsc 0b rw rw portresetstatuschange this bit is set at the end of the 10-ms port reset signal. the hcd writes a ?1? to clear this bit. writing a ?0? has no effect. 0 = port reset is not complete 1 = port reset is complete 19 ocic 0b rw rw portovercurrentindicatorchange this bit is valid only if overcurrent conditions are reported on a per-port basis. this bit is set when root hub changes the portovercurrentindicator bit. the hcd writes a ?1? to clear this bit. writing a ?0? has no effect. 0 = no change in portovercurrentindicator 1 = portovercurrentindicator has changed bit field name root hub reset read/write description hcd hc
6 blocks description SPEAR-07-NC03 92/194 18 pssc 0b rw rw portsuspendstatuschange this bit is set when the full resume sequence has been completed. this sequence includes the 20-s resume pulse, ls eop, a nd 3-ms resychronization delay. the hcd writes a ?1? to clear this bit. writing a ?0? has no effect. this bit is also cleared when resetstatuschange is set. 0 = resume is not completed 1 = resume completed 17 pesc 0b rw rw portenablestatuschange this bit is set when hardware events cause the portenablestatus bit to be cleared. changes from hcd writes do not set this bit. the hcd writes a ?1? to clear this bit. writing a ?0? has no effect. 0 = no change in portenablestatus 1 = change in portenablestatus 16 csc connectstatuschange this bit is set whenever a connect or disconnect event occurs. the hcd writes a ?1? to clear this bit. writing a ?0? has no effect. if currentconnectstatus is cleared when a setportreset, setportenable , or setportsuspend write occurs, this bit is set to force the driver to re-evaluate the connection status since these writes should not occur if the port is disconnected. 0 = no change in currentconnectstatus 1 = change in currentconnectstatus note: if the deviceremovable[ndp] bit is set, this bit is set only after a root hub reset to inform the system that the device is attached. 15 - 10 reserved 09 lsda xb rw rw (read) lowspeeddeviceattached this bit indicates the speed of the device attached to this port. when set, a low speed device is attached to this port. when clear, a full speed device is attached to this port. this field is valid only when the currentconnectstatus is set. 0 = full speed device attached 1 = low speed device attached (write) clearportpower the hcd clears the portpowerstatus bit by writing a ?1? to this bit. writing a ?0? has no effect. bit field name root hub reset read/write description hcd hc
SPEAR-07-NC03 6 blocks description 93/194 08 pps 0b rw rw (read) portpowerstatus this bit reflects the port?s power status, regardless of the type of power switching implemented. this bit is cleared if an overcurrent condition is detected. hcd sets this bit by writing setportpower or setglobalpower . hcd clears this bit by writing clearportpower or clearglobalpower . which power control switches are enabled is determined by powerswitchingmode and portportcontrolmask[ndp] . in global switching mode ( powerswitchingmode =0), only set/ clearglobalpower controls this bit. in per-port power switching ( powerswitchingmode =1), if the portpowercontrolmask[ndp] bit for the port is set, only set/clearportpower commands are enabled. if the mask is not set, only set/ clearglobalpower commands are enabled. when port power is disabled, currentconnectstatus , portenablestatus , portsuspendstatus , and portresetstatus should be reset. 0 = port power is off 1 = port power is on (write) setportpower the hcd writes a ?1? to set the portpowerstatus bit. writing a ?0? has no effect. note: this bit is always reads ?1b? if power switching is not supported. 07 - 05 reserved 04 prs 0b rw rw (read) portresetstatus when this bit is set by a write to setportreset , port reset signaling is asserted. when reset is completed, this bit is cleared when portresetstatuschange is set. this bit cannot be set if currentconnectstatus is cleared. 0 = port reset signal is not active 1 = port reset signal is active (write) setportreset the hcd sets the port reset signaling by writing a ?1? to this bit. writing a ?0? has no effect. if currentconnectstatus is cleared, this write does not set portresetstatus , but instead sets connectstatuschange . this informs the driver that it attempted to reset a disconnected port. bit field name root hub reset read/write description hcd hc
6 blocks description SPEAR-07-NC03 94/194 03 poci 0b rw rw (read) portovercurrentindicator this bit is only valid when the root hub is configured in such a way that overcurrent conditions are reported on a per-port basis. if per- port overcurrent reporting is not supported, this bit is set to 0. if cleared, all power operations are normal for this port. if set, an overcurrent condition exists on this port. this bit always reflects the overcurrent input signal 0 = no overcurrent condition. 1 = overcurrent condition detected. (write) clearsuspendstatus the hcd writes a ?1? to initiate a resume. writing a ?0? has no effect. a resu me is initiated only if portsuspendstatus is set. 02 pss 0b rw rw (read) portsuspendstatus this bit indicates the port is suspended or in the resume sequence. it is set by a setsuspendstate write and cleared when portsuspendstatuschange is set at the end of the resume interval. this bit cannot be set if currentconnectstatus is cleared. this bit is also cleared when portresetstatuschange is set at the end of the port reset or when the hc is placed in the usbresume state. if an upstream resume is in progress, it should propagate to the hc. 0 = port is not suspended 1 = port is suspended (write) setportsuspend the hcd sets the portsuspendstatus bit by writing a ?1? to this bit. wr iting a ?0? has no effect. if currentconnectstatus is cleared, this write does not set portsuspendstatus ; instead it sets connectstatuschange . this informs the driver that it attempted to suspend a disconnected port. bit field name root hub reset read/write description hcd hc
SPEAR-07-NC03 6 blocks description 95/194 the hcrhportstatus [1:ndp] register is used to contro l and report port events on a per-port basis. numberdownstreamports represents the number of hcrhportstatus registers that are implemented in hardware. the lower word is used to reflect the port status, whereas the upper word reflects the status change bits. some st atus bits are implemented with special write behavior (see below). if a transaction (token thro ugh handshake) is in progress when a write to change port status occurs, the resulting port status change must be postponed until the transaction completes. reserved bi ts should always be written '0'. 01 pes 0b rw rw (read) portenablestatus this bit indicates whether the port is enabled or disabled. the root hub may clear this bit when an overcurrent condition, disconnect event, switched- off power, or operational bus error such as babble is detected. this change also causes portenabledstatuschange to be set. hcd sets this bit by writing setportenable and clears it by writing clearportenable . this bit cannot be set when currentconnectstatus is cleared. this bit is also set, if not already, at the completion of a port reset when resetstatuschange is set or port suspend when suspendstatuschange is set. 0 = port is disabled 1 = port is enabled (write) setportenable the hcd sets portenablestatus by writing a ?1?. writing a ?0? has no effect. if currentconnectstatus is cleared, this write does not set portenablestatus , but instead sets connectstatuschange . this informs the driver that it attempted to enable a disconnected port. 00 ccs 0b rw rw (read) currentconnectstatus this bit reflects the current state of the downstream port. 0 = no device connected 1 = device connected (write) clearportenable the hcd writes a ?1? to this bit to clear the portenablestatus bit. writing a ?0? has no effect. the currentconnectstatus is not affected by any write. note: this bit is always read ?1b? when the attached device is nonremovable ( deviceremoveable[ndp] ). bit field name root hub reset read/write description hcd hc
6 blocks description SPEAR-07-NC03 96/194 6.4 ieee1284 host controller figure 9. ieee1284 block diagram figure 10. ieee1284 - dma block diagram 6.4.1 overview the ieee1284 is a host-based multi-function parallel port that may be used to transfer data between a host pc and a peripheral such as a printer. it is designed to attach to the pc's isa bus on one side and to the parallel port connector on the other. the parallel port interface comprises nine contro l/status lines and an 8-bit bi-directional data bus. it can be configured to operate in five modes, corresponding to the i eee standard 1284 parallel interface protocol standards. configuration registers peripheral interface protocol compatibility byte ecp epp amba bus interface iee1284 interface host interface amba wrapper & dma ahb master i/f ahb slave i/f decode rx reg tx reg cfg reg arbiter ack request apb bridge rx tx io port
SPEAR-07-NC03 6 blocks description 97/194 6.4.2 communication modes 6.4.2.1 compatibility mode compatibility mode provides an asynchronous, byte wide, forwar d channel (host-to-peripheral), with the data and status lines used according to original definitions, as per the original centronics port. 6.4.2.2 nibble mode nibble mode provides an asynchronous, reverse channel (peripheral-to-host) under the control of the host. data bytes are transmitted as two s equential, four-bit nibbles using four peripheral- to-host status lines. when the host and/or peripheral do not support bi-directional use of the data lines, nibble mode may be used with comp atibility mode to implement a bi-directional channel. note : the two modes cannot be active simultaneously. 6.4.2.3 ps2 or byte mode byte mode provides an asynchronous, byte wide , reverse channel (peripheral-to-host) using the eight data lines of the interface for data an d the control/status lines for handshaking. byte mode may be used to implement a bi-directional channel, with the transfer direction controlled by the host when both host and peripheral su pport bi-directional use of the data lines. 6.4.2.4 epp mode enhanced parallel port (epp) mo de provides an asynchronous, byte wide, bi-directional channel controlled by the host device. this mo de provides separate address and data cycles over the eight data lines of the interface. 6.4.2.5 ecp mode extended capabilities port (ecp ) mode provides an asynchronous, byte wide, bi-directional channel. an interlocked handshake replaces the compatibility mode's minimum timing requirements. a control line is provided to distinguish between command and data transfers.
6 blocks description SPEAR-07-NC03 98/194 6.4.3 matrix of pr otocol signal names 6.4.4 register map spear net signal names compatible signal names nibble signal names byte signal names epp signal names ecp signal names pd[7:0} pd[7:0} - pd[7:0} pd[7:0} pd[7:0} slct select xflag xflag xflag xflag nack nack ptrclk ptrclk intr nperiphclk busy busy ptrbusy ptrbusy nwait periphack pe pe ackdatareq ackdatareq ackdatareq nackreverse nerr nfault ndataavail ndataavail ndataavail nperiphrequest nslctin nselectin 1284 active 1284 active nastrb ecpmode ninit ninit - - ninit nreverserequest nstrobe nstrobe hostclk hostclk nwrite hostclk nautofd nautofd hostbusy hostbusy ndstrb hostack table 13. ieee1284 register map address register name description 0x2200_0000 dma_ctrl_stat dma status and control register 0x2200_0004 dma_int_en dma interrupt source enable register 0x2200_0008 dma_int_stat dma interrupt status register 0x2200_0010 dma_rx_start dma rx start register 0x2200_0014 dma_rx_ctrl dma rx control register 0x2200_0018 dma_rx_addr dma rx address register 0x2200_0020 dma_rx_caddr dma rx current address register 0x2200_0024 dma_rx_cxfer dma rx current transfer count register 0x2200_0028 dma_rx_to dma rx fifo time out register 0x2200_002c dma_rx_fifo_sts dma rx fifo status register 0x2200_0030 dma_tx_start dma tx start register 0x2200_0034 dma_tx_ctrl dma tx control register 0x2200_0038 dma_tx_addr dma tx address register 0x2200_0040 dma_tx_caddr dma tx current address register 0x2200_0044 dma_tx_cxfer dma tx current transfer count register 0x2200_0048 dma_tx_to dma tx fifo time out register 0x2200_004c dma_tx_fifo_sts dma tx fifo status register 0x2200_0678 (1) ieee_cmp_data in/out data register when used in compatibility and nibble mode ieee_epp_data in/out data regi ster when used in epp mode
SPEAR-07-NC03 6 blocks description 99/194 6.4.5 ieee1284 configuration the ieee1284 is configured by a set of thre e programmable registers accessed through a configuration select register (c sr). these registers will be in default state after power-up and are unaffected by reset. ieee_ecp_addr address register when used in ecp mode 0x2200_0679 (1) ieee_cmp_stat status register in all modes ieee_epp_stat ieee_ecp_stat 0x2200_067a (1) ieee_cmp_ctrl control register in all modes ieee_epp_ctrl ieee_ecp_ctrl 0x2200_067b ieee_epp_addrst b address strobe register in epp mode 0x2200_067c ieee_epp_datastb 1 data 1 strobe register in epp mode 0x2200_067d ieee_epp_datastb 2 data 2 strobe register in epp mode 0x2200_067e ieee_epp_datastb 3 data 3 strobe register in epp mode 0x2200_067f ieee_epp_datastb 4 data 4 strobe register in epp mode 0x2200_07f0 ieee_csr main c onfiguration register 0x2200_07f1 ieee_cfg_cr1 config uration register cr1 ieee_cfg_cr4 configuration register cr4 ieee_cfg_cra configuration register cra 0x2200_0800 (3) ieee_ecp_fifo data fifo register in ecp mode ieee_ecp_test test register in ecp mode ieee_ecp_cfga configuration register a in ecp mode 0x2200_0801 ieee_ecp_cfgb configuration register b in ecp mode 0x2200_0802 ieee_ecp_ecr extended control register in ecp mode table 13. ieee1284 register map address register name description
6 blocks description SPEAR-07-NC03 100/194 6.4.5.1 configuration procedure the following sequence is required to program the configuration registers: 6.4.5.2 configuration select register this write-only register can only be accessed wh en the ieee1284 is in configuration mode. the csr is located at port 0x2200_07f0 and must be initialized upon entering configuration mode before the three configuration registers c an be accessed, after which it can be used to select which of the configuration register s is to be accessed at port 0x2200_07f1. 6.4.5.3 configuration register cr1 this register can only be accessed when the m1284h is in the configuration mode and after csr has been initialized to 01h. the default value of this register after power-up is 9fh. the bit definitions are shown below: step action method 1 enter configuration mode this requires 55h to be written to port 0x2200_07f0 (csr) twice in succession. note: it is recommended that interrupts be disabled for the duration of the two writes. if a write to another address or port occurs between the two writes, the ieee1284 will not enter configuration mode. 2 configure registers the ieee1284 contains three conf iguration registers cr1, cr4 and cra. these registers are accessed by first writing the number of the desired register to port 0x2200_07f0 (csr), then writing or reading the selected register through port 0x2200_07f1 3 exit configuration mode configuration mode is exited by writing an aah to port 0x2200_07f0 (csr). bit function description 7 - not used 6 - not used 5 - not used 4 - not used 3 parallel port mode if 1, sets the parallel port for com patibility mode (default). if 0, enables the extended parallel port mode. (see cr4) 2 - not used 1:0 parallel port address these bits are used to select the parallel port address. bit 1 bit 0 description 0 0 disabled 0 1 0x2200_0778 1 0 0x2200_07bc 1 1 0x2200_0678 (default)
SPEAR-07-NC03 6 blocks description 101/194 6.4.5.4 configuration register cr4 this register can only be accessed when the ie ee1284 is in configuration mode and after csr has been initialized to 04h. the default value of this register after power-up is 00h. the bit definitions are shown below: note: 1 standard parallel port operation denotes the use of the peripheral data bus in either compatibility mode (and/or nibble mode) or ps/2 (byte) mode. 2 spp operation may be select ed through the ecr regist er of ecp as mode 000. 3 epp mode is selected through the ecr register of ecp as mode 100. 6.4.5.5 configuration register cra this register can only be accessed when the i eee1284 is in the configuration mode and after csr has been initialized to 0ah. the default value of this register after po wer-up is 00h. this register's byte defines the fifo threshold for the ecp mode parallel port. bit function description 7 reserved must be always written with 0 6 - not used 5 - not used 4 - not used 3 - not used 2 - not used 1:0 bit 1 bit 0 if cr1[3] = 0 then 00 standard parallel port (spp) operation (default) (note 1) 01 epp mode (also supports spp operation) 1 0 ecp mode (note 2) 1 1 ecp & epp modes (notes 2, 3) if cr1 (3) = 1, the port is placed in compatibility mode.
6 blocks description SPEAR-07-NC03 102/194 6.4.6 dma registers all the dma registers are 32 bit wide. 6.4.6.1 dma status and control register address 0x2200_0000 default value 0x tx_fifosize : size of transmitter data path fifo. 0001: 2 * 32 bit words tx_io_data_width : width of the i/o bus transmit data path 00: 8-bit tx_chan_status : provides information about the tx channel structure 01: low end tx channel (no dma descriptor fetch) rx_fifosize : size of receiver data path fifo. 0001: 2 * 32 bit words rx_io_data_width : width of the i/o bus receive data path 00: 8-bit rx_chan_status : provides information abou t the rx channel structure 01: low end rx channel (no dma descriptor fetch) revision : revision of the dma ???????? loopb : set to '1' to enable the loop-back mode. when set the rx dma data are extracted by the tx fifo and pushed in the rx one. sreset : dma soft reset, set to '1' to put t he whole dma logic in reset condition. this signal has no effect on the ahb interfac e so the whole dma will be reset only when the last ahb transfer is finished. bit field name access 31 - 28 tx_fifo _size ro 27 - 26 tx_io_data_width ro 25 - 24 tx_chan_status ro 23 - 20 rx_fifo_size ro 19 - 18 rx_io_data_width ro 17 - 16 rx_chan_status ro 15 - 08 revision ro 07 - 04 reserved ro 03 - 02 reserved ro 01 loopb rw 00 sreset rw
SPEAR-07-NC03 6 blocks description 103/194 6.4.6.2 dma_int_en address : 0x2200_0004 default value : 0x0000_0000 the dma interrupt enable register allows the various sources of interrupt to be individually enabled. all the enabled sources will then be or-ed to generate the gl obal dma interrupt. setting a bit in dma_int_en register allows the corresponding interrupt described in dma_int_stat to influence the global dma interrupt. bit field name access 31 reserved ro 30:29 reserved ro 28 tx_io_int_en 27:26 reserved 25 tx_merr_int_en 24 tx_serr_int_en 23 tx_done_en 22 reserved 21 tx_ioreq_en 20 tx_rty_en 19 tx_to_en 18 tx_entry_en 17 tx_full_en 16 tx_empty_en 15 reserved 14:13 reserved 12 rx_io_int_en 11:10 reserved 09 rx_merr_int_en 08 rx_serr_int_en 07 rx_done_en 06 reserved 05 rx_iorq_en 04 rx_rty_en 03 rx_to_en 02 rx_entry_en 01 rx_full_en 00 rx_empty_en
6 blocks description SPEAR-07-NC03 104/194 if any bit is set to '1' in both dma_int_stat and dma_int_en then th e dma interrupt will be asserted. refer to the dma_int_stat for a description of the interrupt sources. 6.4.6.3 dma interrupt sources status register mnemonic : dma_int_stat address : 0x2200_0008 default value: 0x0000_0000 bit field name access 31 reserved ro 30:29 reserved ro 28 tx_io_int rw 27:26 reserved ro 25 tx_merr_int rw 24 tx_serr_int rw 23 tx_done rw 22 reserved ro 21 tx_ioreq rw 20 tx_rty rw 19 tx_to rw 18 tx_entry rw 17 tx_full rw 16 tx_empty rw 15:13 reserved ro 12 rx_io_int rw 11:10 reserved ro 09 rx_merr_int rw 08 rx_serr_int rw 07 rx_done rw 06 reserved ro 05 rx_ioreq rw 04 rx_rty rw 03 rx_to rw 02 rx_entry rw 01 rx_full rw 00 rx_empty rw
SPEAR-07-NC03 6 blocks description 105/194 client interrupt status register reports the inte rrupt status of interrupts from the following sources: dma_rx, dma_tx and io_ip. all the significant register bits are read/clear (rc): they can be read, a write with '0' has no effect while writing '1' reset the bit value to '0'. each bit can bi cleared writing '1' (writing '0' will have no effect) tx_io_int : set when the external io device (ieee12 84 block), connected to the tx dma port, sets an interrupt request. tx_merr_int : set when ahb master receives an error response from the selected slave and the internal arbiter is granting the tx fifo. tx_serr_int : set when the ahb slave drives an error on the ahb bus as response to an tx_fiofo_push request. this condition is achiev ed when on of the following conditions is true: i. tx_dma.start_serr_en is true and retry counter expires. ii. slave access with size > 32 bit. iii. slave access with a read request. iv. slave access when the tx_dma_start.dma_en is true (dma master mode) tx_done : set when the tx ma ster dma completes. tx_ioreq : set when the dma tx is active (master or slave mode) and the io interface request cannot be served because: i. fifo is empty ii. current dma cycle is finished and the next one is not yet started. tx_rty : set when the ahb slave retry counter expires (even if the tx_dma_start.serr_en is false), that me ans that an ahb tx fifo write has been attempt, with a wrong byte size attributes , more than allowed by the retry counter. tx_to : set when some data are stalled inside the tx fifo for too long time. tx_entry : set when the tx dma is triggered by a number of empty tx fifo entries bigger than the value set in the dma_cntl register. tx_full : set when the tx fifo becomes fu ll (< 4 byte entries available). tx_empty : set when the tx fifo becomes empty. rx_io_int : set when the external io device (ieee1284 block), connected to the rx dma port, sets an interrupt request. rx_merr_int : set when ahb master receives an erro r response from the selected slave and the internal arbiter is granting the rx fifo. rx_serr_int : set when the ahb slave drives an error on the ahb bus as response to a rx_fifo_pop request. this condition is achieved when on of the following conditions is true: v. rx_dma.start_serr_en is true and retry counter expires. vi. slave access with size > 32 bit.
6 blocks description SPEAR-07-NC03 106/194 vii. slave access with a write request. viii. slave access when the rx_dma_start.dma_en is true (dma master mode) rx_done : set when the rx master dma completes. rx_ioreq : set when the dma rx is active (master or slave mode) and the io interface request cannot be served because: i. fifo is full ii. current dma cycle is finished and the next one is not yet started. iii. there is a time-out condition (acknowl edge is de-asserted for one clock cycle) rx_rty : set when the ahb slave retry counter expires (even if the rx_dma_start.serr_en is false), that means that an ahb rx fifo read has been attempt, with a wrong byte size attributes , more than allowed by the retry counter. rx_entry : set when the rx dma is triggered by a number of valid rx fifo entries bigger than the value set in the dma_cntl register. rx_full : set when the rx fifo becomes full and no more data can be accepted. rx_empty : set when the rx fifo becomes empty. 6.4.6.4 rx dma start register mnemonic : rx_dma_start address : 0x2200_0010 default value: 0x0000_0000 serr_en : set to '1' to enable the rx dma slave logic to respond with an error, instead of retry, when the retry count expires. io_en : set to '1' enable the rx dma interface, in slave mode (dma_en must be '0'), to get data from the io ip (ieee1284) and write it into the rx fifo. dma_en : writing '1' starts the rx dma master sm running. when all the dma sequences complete, this bit is reset by the dma logic. note: the dma_en 0->1 transition or io_en 0->1(with dma_en = 0) transition resets the fifo content and the rx interrupts (dma_int_stat(15:0)). bit field name access 31:24 reserved ro 23:08 reserved ro 07:04 reserved ro 03 serr_en rw 02 reserved ro 01 io_en rw 00 dma_en rw
SPEAR-07-NC03 6 blocks description 107/194 even if dma_en has an higher priority with respect io_en (when dma_en=1, the io_en bit is don't care), it's suggested to avoid the set of the two bit at the same time. when the processor wants to start a new master dma, first it has to fill the descriptor registers (dma_cntl, dma_addr and, if required, dma_nxt) and then it has to enable the dma (write a '1' in dma_en). when all the dma sequences complete, the dma sm resets to '0' the dma_en bit and waits for this field being enabled again. if the dma descriptor fetch logic has been enabled, more than one dma can complete before the dma_en bit is reset; in this case it will be set to '0' only a fter the last dma ends. 6.4.6.5 rx dma cntl register mnemonic : rx_dma_cntl address : 0x200_0014 default value: 0x0000_0000 addr_wrap : determines where the dma address counter wraps by forcing the dma address counter to retain the data originally writ ten by the host in dma_addr. as soon as the dma has written the memory location prior to the value specified in add_wrap the wrapping condition occurs. this can be used to restrict the address counter within an address window (e.g. circular buffer). the wrapping point must be 32 bit aligned, so the 10 bits of addr_wrap are used to compare dma address bits 11 to 2; if add_wr ap=dma_addr (11:2) then a 4kbyte buffer is defined. addrwrap is ignored unless wrap_en is set. entry_trig : determines the amount of valid entries (in 32 bit words) required in the receive fifo before the dma is re-triggered. if the value is set to 0, as soon as one valid entry is present, the dma logic starts the data transfer. dly_en : this bit enables (when '1') the dma trigger delay feature: if a fifo valid data resides in the fifo more than a programmed period (d ma_to), a time-out condition occurs that requires the dma sm to empty the fifo even if the number of valid words doesn't exceed the threshold value. bit field name access 31:22 addr_wrap rw 21:17 entry_trig rw 16 reserved ro 15 dly_en rw 14 reserved ro 13 reserved ro 12 cont_en rw 11:00 dma_xfercount rw
6 blocks description SPEAR-07-NC03 108/194 cont_en : continuous mode enable, enables continuous dma run. if set the dma runs indefinitely ignorin g dma_ xfercount. note: "continuous mode" supersedes "next descriptor mode". dma_xfercount : block size (in bytes) of dma, maximum 4 kbytes. note: the dma_xfercount field must have a va lue multiple of the io dma bus size, i.e. io dma data bus 8 bit -> all dma_xfercount values are allowed io dma data bus 16 bit -> dma_xfercount(0) must be 0 io dma data bus 32 bit -> dma_xfercount(1:0) must be 00 if dma_xfercount is set to '0', the dma will transfer 4 kbyte data. 6.4.6.6 rx dma addr register mnemonic : rx_dma_addr address : 0x2200_0018 default value : xxxx_xxxx dma_addr : start address, 32 bits word aligned, for master dma transfer. dma sm will read this register only before star ting the dma operation, so further updates of this register will have no effect on the running dma. fix_addr : disables incrementing of dma_addr: this means that all the dma data transfer operation will be performed at the same ahb address, i.e. th e dma base address. wrap_en : enables wrap of the dma transfer address to dma_addr when the memory location, specified in addr_wrap, is reached. 6.4.6.7 rx dma curren t address register mnemonic : rx_dma_caddr address : 0x2200_0020 default : xxxx_xxxx dma_caddr : current dma address value, byte aligned. the value of this regist er will change while the dma is running, reflecti ng the value driven by the core on the ahb bus. bit field name access 31:02 dma_addr rw 01 fix_addr rw 00 wrap_en rw bit field name access 31:00 dma_caddr rw
SPEAR-07-NC03 6 blocks description 109/194 6.4.6.8 rx dma current transfer count register mnemonic : rx_dma_cxfer address : 0x2200_0024 default value: xxxx_xxxx dma_cxfer : current dma address value, byte aligned. the value of this regist er will change while the dma is running, reflecti ng the value driven by the core on the ahb bus. 6.4.6.9 rx dma fifo time out register mnemonic : rx_dma_to address : 0x2200_0028 default value : 0x0000_0000 time_out : this value is used as initial value for the fifo entry time out counter in master mode and as initial value for the retry counter in slave mode. register value must be not zero if the feature that use it are activated. the time-out counter starts as soon as one valid entry is present in the fifo and is reset every time a fifo data is pop out of the fifo. the counter expires (fifo time out condition) if no fifo data are pop for a period longer than the time_out register value; w hen this happens, depending on the control registers settings, an interrupt can be set or the fifo can be flushed. retry counter is incremented after each ahb slave retry response and is cleared after okay or error response. bit field name access 31:12 reserved ro 11:00 dma_cxfer rw bit field name access 31:16 reserved ro 15:00 time_out rw
6 blocks description SPEAR-07-NC03 110/194 6.4.6.10 rx dma fifo status register mnemonic : rx_dma_fifo address : 0x2200_002c default value : 0x????_???? entries : full entries (in 32 bits words) in fifo. dma_pointer : fifo dma sm side pointer value. io_pointer : fifo io side pointer value. delay_t : set to '1' when dma fifo delay time out is expired. entry_t : set to '1' when the dma fifo entry trigger threshold has been reached. full : set to '1' when the dma fifo is full. empty : set to '1' when the dma fifo is empty 6.4.6.11 dma start register mnemonic : tx_dma_start address : 0x2200_0030 default value : 0x0000_0000 serr_en : set to '1' to enable the tx dma slave logic to respond with an error instead of retry when the retry counter is expired. bit field name access 31:30 reserved ro 29:24 entries ro 23:21 reserved ro 20:16 dma_pointer ro 15:13 reserved ro 12:08 io_pointer ro 07:04 reserved ro 03 delay_t ro 02 entry_t ro 01 full ro 00 empty ro bit field name access 31:04 reserved ro 03 serr_en rw 02 reserved ro 01 io_en rw 00 dma_en rw
SPEAR-07-NC03 6 blocks description 111/194 io_en : set to '1' to enable the tx dma interface, in slave mode (dma_en must be set to '0'), to get data from the tx fifo, as soon as they are valid, and pass them to the io ip (ieee1284) block, on its request. dma_en : the tx dma master sm starts when this bit is set to '1'. when all the dma sequences are completed, this bit is reset to '0' by the dma logic itself. note: the dma_en 0->1 transition or io_en 0->1(with dma_en = 0) transition resets the fifo content and the tx interrupts (dma_int_stat(15:0)). even if dma_en has an higher priority with respect io_en (when dma_en=1, the io_en bit is don't care), it's suggested to avoid the set of the two bit at the same time. when the processor wants to start a new master dma, first it has to fill the descriptor registers (dma_cntl, dma_addr and, if required, dma_nxt) and then it has to enable the dma (write a '1' in dma_en). when all the dma sequences complete, the dma sm resets to '0' the dma_en bit and waits for this field being enabled again. f the dma descriptor fetch logic has been enabled, more than one dma can complete before the dma_en bit is reset; in this case it will be set to '0' only a fter the last dma ends. 6.4.6.12 tx dma control register mnemonic : tx_dma_cntl address : 0x2200_0034 default value : 0x0000_0000 addr_wrap : determines where the dma address counter wraps by forcing the dma address counter to retain the data originally writ ten by the host in dma_addr. as soon as the dma has read the memory location prior to the value specified in add_wrap the wrapping condition occurs. this can be used to restrict the address counter within an address window (e.g. circular buffer). the wrapping point must be 32 bit aligned, so the 10 bits of addr_wrap are used to compare dma address bits 11 to 2; if add_wrap=dma_addr(11:2) then a 4kbyte buffer is defined. addrwrap is ignored unless wrap_en is set. entry_trig : determines the amount of empty entries (in 32 bit words) required in the tx fifo before the dma is re-triggered. bit field name access 31:22 addr_wrap rw 21:17 entry_trig rw 16 reserved ro 15 dly_en rw 14:13 reserved ro 12 cont_en rw 11:00 dma_xfercount rw
6 blocks description SPEAR-07-NC03 112/194 if the value is set to 0, as soon as one empty entry is present, the dma logic starts the data request. dly_en : this bit enables (when '1') the dma trigger delay feature: if a fifo valid data resides in the fifo more than a programmed period (d ma_to), a time-out condition occurs and the related (tx_to) inte rrupt will be set. cont_en : continuous mode enable, enables continuous dma run. if set the dma runs indefinitely ignorin g dma_ xfercount. note: "continuous mode" supersedes "next descriptor mode". dma_xfercount : block size (in bytes) of dma, maximum 4 kbytes. note: the dma_xfercount field must have a va lue multiple of the io dma bus size, i.e. io dma data bus 8 bit -> all dma_xfercount values are allowed io dma data bus 16 bit -> dma_xfercount(0) must be 0 io dma data bus 32 bit -> dma_xfercount(1:0) must be 00 if dma_xfercount is set to '0', th e dma will transfer 4 kbytes data. 6.4.6.13 tx dma address register mnemonic : tx_dma_addr address : 0x2200_0038 default value : xxxx_xxxx dma_addr : start address, 32 bit word aligned, for master dma transfer. the dma sm reads this register only before starting the dma operation, so further updates of this register will have no effect on the running dma. while the dma is in progress, a read operation to this register will return the dma current address value. fix_addr : disables incrementing of dma_addr: this means that all the dma data transfer operation will be performed at the same ahb address, i.e. th e dma base address. wrap_en : enables wrap of the dma transfer address to dma_addr when the memory location, specified in addr_wrap, is reached. bit field name access 31:02 dma_addr rw 01 fix_addr rw 00 wrap_en rw
SPEAR-07-NC03 6 blocks description 113/194 6.4.6.14 tx dma curr ent address register mnemonic : tx_dma_caddr address : 0x2200_0040 default value: xxxx_xxxx dma_caddr : current dma address value, byte aligned. the value of this regist er will change while the dma is running, reflecti ng the value driven by the core on the ahb bus. 6.4.6.15 tx dma curr ent transfer register mnemonic : tx_dma_cxfer address : 0x2200_0044 default value: xxxx_xxxx dma_cxfer : current dma transfer counter value. it's updated while the dma is running. 6.4.6.16 tx dma fifo time out register mnemonic : tx_dma_to address : 0x2200_0048 default value: 0x0000_0000 time_out : this value is used as initial value for the fifo entry time out counter in master mode and as initial value for the retry counter in slave mode. register value must be not zero if the features that use it are activated. this counter starts as soon as one valid entry is present in the fifo and is reset every time a fifo data is pop out of the fifo. the counter expires (fifo time out condition) if no fifo data are pop for a period longer than the time_out register value; w hen this happens, depending on the control registers settings, an interrupt can be set. retry counter is incremented after each ahb slave retry response and is cleared after okay or error response. bit field name access 31:00 dma_caddr ro bit field name access 31:12 reserved ro 11:00 dma_cxfer ro bit field name access 31:16 reserved ro 15:00 time_out rw
6 blocks description SPEAR-07-NC03 114/194 6.4.6.17 tx dma fifo status register mnemonic : tx_dma_fifo address : 0x2200_004c default value : 0x????_???? entries : free entries (in 32 bits word) in fifo. dma_pointer : fifo dma sm side pointer value. io_pointer : fifo io side pointer value. delay_t : set to '1' when the dma fifo delay time out is expired. entry_t : set to '1' when the dma fifo entry trigger threshold has been reached. full : set to '1' when dma fifo is full. empty : set to '1' when the dma fifo is empty. 6.4.7 parallel port register this section is split into th ree sub-sections : compatibility and byte modes; epp mode; and ecp mode. each register set description gives the i/o address assignments and a description of the relevant registers and its bits. it is worth noting that the stat and ctrl registers (described under compatib ility and byte m odes) are common to all modes. the base address for the parallel port is determined at power-up. this can be changed by software as described in section all registers are accessed as byte quantities. some of the registers de scribed contain reserved bits. thes e will have a hard value associated with them, defined in the register description: this value will no t change even if these bits are written to. a read from a register that contai ns reserved bits will return the hard values associated with those bits. bit field name access 31:30 reserved ro 29:24 entries ro 23:21 reserved ro 20:16 dma_pointer ro 15:13 reserved ro 12:08 io_pointer ro 07:04 reserved ro 03 delay_t ro 02 entry_t ro 01 full ro 00 empty ro
SPEAR-07-NC03 6 blocks description 115/194 6.4.7.1 compatibility and byte modes the port consists of three registers and can be programmed to operate at three different base addresses - 0x2200_0678, 0x2200_0378 and 0x2200_03bc. the write locations are: i. write data to output port (data) - base address + 0h ii. write command to output port (ctrl)- base address + 2h the read locations are: iii. read peripheral data (data) - base address + 0h iv. read peripheral status data (stat) - base address + 1h v. read back control register (ctrl) - base address + 2h stat register (ro) this read-only register has a port address of base address + 01h. the bit definitions are shown below: note: note : you may only read from the stat register: writes to it have no effect. ctrl register (rw) this read/write register has a port address of base address + 02h. the bit definitions are shown below: bit name comment d7 nbusy if asserted, indicates that the peripheral is busy. d6 nack if asserted, indicates that the peripheral has received a data byte and is ready for another. d5 pe if asserted, indicates that the peripheral is out of paper. d4 slct if asserted, indicates that the peripheral is selected. d3 nerr if asserted, indicates that the peripheral has a fault. d2 reserved always returns 0. d1 reserved always returns 0. d0 timeout asserted high wh en timeout occurs (only in epp mode). bit name comment d7 reserved always returns 0. d6 reserved always returns 0. d5 pdir direction bit. (read/write only in epp and ecp modes.) d4 inten if asserted, allows the peripheral to interrupt the cpu. d3 slctin if asserted, it means the host has selected the peripheral. d2 ninit if asserted, the peripheral is initialized. d1 autofd this tells the printer to advance the paper by one line each time a carriage return is received. d0 strobe if asserted, this instructs the peripheral to accept the data on the data bus
6 blocks description SPEAR-07-NC03 116/194 note: slctin, autofd and strobe are inverted when read back from the ctrl register. in ps/2 (byte) mode, bit 5 is used to control the direction of the data transfer on the parallel port data bus. also in byte mode, when pdir = 0 (f orward direction), pdout[7:0] is enabled; when pdir = 1 (reverse direction), pdin[7:0] is enabled. at reset, ctrl is set to 00h. 6.4.7.2 epp mode the following table shows the i/o assignments for the registers used in epp mode: the data, stat and ctrl registers are as de scribed above for the compatibility and byte modes. the addstr register provides a peripheral addr ess to the peripheral via pdout[7:0] during a host write, and to the host via pdin[7:0] during a host address read operation. an automatic address strobe is generated on the parallel port in terface when data is read or written to this register. the datastr registers provide data from the host to the peripheral via pdout[7:0] during a write operation, and data from the peripheral to the host during a read operation. an automatic data strobe is generated on the parallel port interface when data is read or written to these registers. if no epp read, write or address cycle is currentl y being executed, the peripheral data bus may be used in either compat ibility mode (and/o r nibble mode) or ps/2 (byte) mode. in this condition, all output signals (nstrobe, nautofd and ninit) are set by the ctrl register and direction is controlled by the pdir bit of the ctrl register. before an epp cycle is executed, the control regist er pdir bit must be set to 0 (by writing 04h or 05h to the ctrl regist er). if pdir is left se t to 1, the ieee1284 will not be able to perform a write and will appear instead to perform an epp read on the para llel bus without any error being indicated. if an epp bus cycle does not termin ate within 10ms, the epp time out flag will be set and all following epp bus cycles will be aborted until this flag is cleared writing to the stat register. parallel port register address base address + abbreviation register name access 0h data data register rw 1h stat status register ro 2h ctrl control register rw 3h addstr address strobe register rw 4h ? 7h datastr data strobe registers rw
SPEAR-07-NC03 6 blocks description 117/194 6.4.7.3 ecp mode this section describes the registers used in ec p mode. it is worth noting that the extended control register ecr (which can only be ente red from ecp mode) allows various modes of operation. in particular , ecr[7:5] = 000 selects compatibilit y mode and ecr[7: 5] = 001 selects byte mode. these have been discussed above. the i/o assignments in ecp mode are shown below: the functions of the above registers are detailed in the 'extended capabilit ies port protocol and isa interface standard rev 1.12', which is available from microsoft. the bit map of the extended parallel port r egisters is shown below: note: 1 these registers are available in all modes. 2 all fifos use one common 16 byte fifo. port address base address + abbreviation register name ecr[7:5] access 0h ecpafifo ecp address register 011 rw 1h stat status register all r 2h ctrl control register all rw 400h sdfifo standard parallel port data fifo 010 rw 400h ecpdfifo ecp data fifo 011 rw 400h tfifo test fifo 110 rw 400h cfga ecp configuration a register 111 rw 401h cfgb ecp configuration b register 111 rw 402h ecr extended control register all rw d7 d6 d5 d4 d3 d2 d1 d0 note data pd7 pd6 pd5 pd4 pd3 pd2 pd1 pd0 1 ecpafifo 1 address 2 stat nbusy nack pe slct nerr 0 0 0 1 ctrl 0 0 pdir inten slctin nint fd strobe 1 sdfifo parallel port data fifo 2 ecpdfifo ecp data fifo 2 tfifo test fifo 2 cfga 00010000 cfgb 0pintr1000000 ecr mode interr dmaen servint fifof fifoe
6 blocks description SPEAR-07-NC03 118/194 ecp address fifo register (ecpafifo) the ecpafifo register provides a channel address to the peripheral depending on the state of bit 7. this i/o address location is only used in ecp mode (ecr bits [7:5 ]=011). in this mode, bytes written to this register are placed in the parallel port fifo and transmitted via pdout[7:0] using the ecp protocol. bit 7 should always be set to 1. bits [7:0] ecp address the register contents is passed to the peri pheral by pdout[7:0]. the peripheral should interpret bits [6:0] as a channel address. note: that the spear net asse rts nautofd to indicate that info rmation on the pd[7:0] is an ecp address. the spear net negates nautofd when pd[7:0] is transferring data. status register (stat) already discussed in section 5.4.5.1.1. control register (ctrl) already discussed in section 5.4.5.1.2. standard parallel port data fifo register (sdfifo) sdfifo is used to transfer data from the host to the peripheral when the ecr register is set for compatible fifo mode (bits [7:5 ] = 010). data bytes wr itten or dmaed from the system to this fifo are transmitted by a hardware handsh ake to the peripheral using the standard compatibility protocol. for this register, bytes are placed in the para llel port fifo using datain[7:0] and transmitted via pdout[7:0]. note: that bit 5 in the ctrl register must be set to 0 for forward transfer. ecp data fifo register (ecpdfifo) ecpdfifo is used to transfer data from the host to the peripheral when the ecr register is set for ecp mode (bits [7:5] = 011). data bytes writte n or dmaed from the system to this fifo are transmitted by a hardware handshake to the peripheral using the ecp protocol. note: that bit 5 in the ctrl register must be set to 0 for forward transfer or to 1 for a reverse transfer. test fifo register (tfifo) the test fifo provides a test mechanism for the ecp mode fifo by allowing data to be read, written or dmaed in either direction between the system and this fifo. this test mode is selected by setting ecr[7:5] = 110. the data is transferred purely through the microp rocessor interface and is therefore transferred at the maximum isa rate. it may appear on the parallel port data lines, but without any hardware handshake. the test fifo does not stall when overwritten or under-run. data is simply ignored or re-read. the full and empty bits of the ecr register (bits 1 and 0) can however be used to ascertain the correct state of the fifo. ecp configuration register a (cfga) the cfga register provides information about th e ecp mode implementation. it is a read only register. access to this register is enabled by programming the ecr regi ster (ecr[7:5] = 111). the bit definitions in this register are shown below:
SPEAR-07-NC03 6 blocks description 119/194 0b00010000 at reset cfga is set to 10h. 10h indicates an 8-bit implementation. ecp configuration register b (cfgb) the cfgb register checks the pintr1 line to det ermine possible conflicts. it is a read only register. the bit definitions are shown below: extended control register (ecr) this read/write register selects ecp mode, enab les service and error interrupts and provides interrupt status. the ecr also enables and disables dma operations and provides fifo empty and fifo full status. the bit definitions are shown below: bits [7:5] - ecp mode select this field selects one of the following modes: mode 000 this puts the parallel port into comp atibility mode and resets the pointers to the fifo (but not its contents). setting the di rection bit in the ctrl register does not affect the parallel port interface in this mode. for register descriptions in this mode, refer to section 4.1 ?functional pin groups? on page 13. mode 001 this puts the parallel port into byte mode and resets the pointers to the fifo (but not its contents). the outcome is similar to above except that the direction bit selects forward or reverse transfers. bit name description d7 - always return 0 d6 pintr1 returns the value of the pintr1 line d5 - always return 0 d4 - always return 0 d3 - always return 0 d2 - always return 0 d1 - always return 0 d0 - always return 0 bit name description d7 mode3 mode bit. d6 mode2 mode bit. d5 mode1 mode bit. d4 interr error interrupt enable. d3 dmaen dma enable. d2 servint service interrupt. d1 fifof this bit is set when the fifo is full. d0 fifoe this bit is set when the fifo is empty.
6 blocks description SPEAR-07-NC03 120/194 mode 010 this puts the parallel port into isa compatible fifo mode, which is the same as mode 000 except that pwords are writte n or dmaed to the fifo. fifo data is automatically transmitted using the stan dard parallel port protocol. note, this mode should only be used when pdir = 0. mode 011 this puts the port into ecp mode. in the forward direction, bytes written to the ecpdfifo and ecpafifo locations are placed in the ecp fifo and transmitted automatically to the periphera l using ecp protocol. in the reverse direction, bytes are transferred fr om pdin [7:0] to the ecp fifo. mode 100 reserved. mode 101 reserved. mode 110 this selects an ecp test mode in which the fifo is read and written purely through the microprocessor interface. mode 111 this is places the interface into c onfiguration mode. in this mode, the cfga and cfgb registers are accessible at base address + 400h and at base address + 401h, respectively. bit [4] - interr when 0, this bit enables error interrupts to the ho st when a high to low tr ansition occurs on the nerr signal. bit [3] - dmaen dma is enabled when dmaen = 1, and disabled when dmaen =0. bit [2] - service in terrupt (servint) if servint = '1', dma is disabled and all service interrupts are disabled. servint = '0' enables one of three interrupts: i. if dmaen = '1' during dma, the servint bit will be set to a 1 when terminal count is reached. ii. if dmaen = '0' and pdir = 0, the servint bit will be set to '1' whenever there are 'writeintrthreshold' or mo re bytes free in the fifo (see section 4.3.6.1). iii. if dmaen = '0' and pdir = 1, the servint bit will be set to '1' whenever there are 'readintrthreshold' or more valid bytes to be read from the fifo (see section 4.3.6.2). bit [1] - fifo full status (fifof) this bit indicates when the fifo is full. bit [0] - fifo empty status (fifoe) this bit indicates when the fifo is empty.
SPEAR-07-NC03 6 blocks description 121/194 6.5 uart controller figure 11. uart block diagram 6.5.1 overview the uart provides a standard serial data communication with transmit and receive channels that can operate concurrently to handle a full-duplex operation. two internal fifo for transmitted and received data, deep 16 and wide 8 bits, are present; these fifo can be enabled or disabled through a register. interrupts are provided to control reception and transmission of serial data. the clock for both transmit and receive channels is provided by an internal baud rate generator that divides the ahb system clock by any divi sor value from 1 to 255. the output clock frequency of baud generator is sixteen times the baud rate value. the maximum speed achieved is 115.000 baud. apb interface register array local fifo baud rate generator rxclk txclk receiver shift register transmitter shift register amba ahb
6 blocks description SPEAR-07-NC03 122/194 6.5.2 registers map 6.5.3 register description all the uart registers are 16 bit wide. 6.5.3.1 baud rate generator register mnemonic : uart_baud_rate address : 0x3000_ 18 00 default value : 0x0001 baude_rate - this register select the uart baud rate according to the following formula: hclk frequency (48mhz) / (uart_baud_rate * 16) uart tx buffer register address register name access 0x3000_1800 uart_baud_rate rw 0x3000_1804 uart_tx_buffer wo 0x3000_1808 uart_rx_buffer ro 0x3000_180c uart_control rw 0x3000_1810 uart_int_enable rw 0x3000_1814 uart_status ro 0x3000_1818 uart_guard_time rw 0x3000_181c uart_time_out rw 0x3000_1820 uart_tx_reset wo 0x3000_1824 uart_rx_reset wo bit field name access 15:00 baud_rate rw baud reg. value error 110 0x6a88 0.003% 150 0x4e20 0 300 0x2710 0 600 0x1388 0 1200 0x09c4 0 2400 0x04e2 0 4800 0x01a0 0 9600 0x0138 0.16% 19200 0x009c 0.16% 38400 0x004e 0.16% 115200 0x001a 0.16%
SPEAR-07-NC03 6 blocks description 123/194 6.5.3.2 mnemonic: uart_tx_buffer address : 0x3000_ 18 04 default value : 0x0000 tx_data - values written to this register will f ill the 16 word tx fifo. when the fifo is disabled values written to this register will directly fill the tran smitter shift register. 6.5.3.3 uart rx buffer register mnemonic : uart_rx_buffer address : 0x3000_ 18 08 default value: 0x0000 rx_data - values read to this regi ster will un-fill the 16 word rx fifo. when the fifo is disabled value read to this register w ill directly empty the rx shift register. 6.5.3.4 uart control register mnemonic : uart_control address : 0x3000_ 18 0c default value : 0x0000 fifo_en - when set to '1' enable the fifo. reserved - this bit should be always set to '0'. rx_en - when set enable the rx channel. bit field name access 15:09 reserved ro 08:00 tx_data wo bit field name access 15:10 reserved ro 09:00 rx_data ro bit field name access 15:11 reserved ro 10 fifo_en rw 09 reserved rw 08 rx_en rw 07 run rw 06 loop_en rw 05 parity rw 04:03 stop_bit rw 02:00 mode rw
6 blocks description SPEAR-07-NC03 124/194 run - when set to '1' enable the bud rate generator. note : if this bit is reset both tx and rx channels are inactive. loop_en - when set to '1' enable the internal loop and the external tx and rx lines become inactive. pa r it y - parity selection bit. '1' means "odd" parity (parity bit set on even number of '1's in data) stop_bit - select the number of stop bit added. mode - mode control field 6.5.3.5 uart interrupt enable register mnemonic : uart_int_en address : 0x3000_ 18 10 default value : 0x0000 b4 b3 stop bit 0 0 0.5 stop bit 0 1 1 stop bit 1 0 1.5 stop bit 1 1 2 stop bit b2 b1 b0 mode 0 0 0 reserved 0 0 1 8 bit data 0 1 0 reserved 0 1 1 7 bit data + parity 1 0 0 9 bit data 1 0 1 8 bit data + wake up 1 1 0 reserved 1 1 1 8 bit data + parity bit field name access 15:09 reserved ro 08 rx_half_full rw 07 time_out_idle rw 06 time_out_not_empty rw 05 overrun_error rw 04 frame_error rw 03 parity_error rw 02 tx_halt_empty rw 01 tx_buffer_empty rw 00 rx_buffer_full rw
SPEAR-07-NC03 6 blocks description 125/194 each bit, when set to '1' w ill enable the corr esponding interrupt while , when reset to '0' will mask it. 6.5.3.6 uart status register mnemonic : uart_status address : 0x3000_ 18 14 default value : 0x0006 6.5.3.7 uart guard time register mnemonic : uart_guard_time address : 0x3000_ 18 18 default value : 0x0000 guard_time - this register define the delay, in term of bit time from the last character transmitted and the assertion of tx_buffer_empty. 6.5.3.8 uart time out register mnemonic : uart_time_out address : 0x3000_ 18 1c default value : 0x0000 bit field name access 15:10 reserved ro 09 tx_full ro 08 rx_half_full ro 07 time_out_idle ro 06 time_out_not_empty ro 05 overrun_error ro 04 frame_error ro 03 parity_error ro 02 tx_halt_empty ro 01 tx_buffer_empty ro 00 rx_buffer_full ro bit field name access 15:08 reserved ro 07:00 guard_time rw bit field name access 15:08 reserved ro 07:00 time_out rw
6 blocks description SPEAR-07-NC03 126/194 time_out - this register set the time out value in term of bit time between two consecutive characters received. 6.5.3.9 uart tx reset register mnemonic : uart_tx_reset address : 0x3000_ 18 20 default value: na any value written to this address will re set the tx fifo. this register is wo. 6.5.3.10 uart rx reset register mnemonic : uart_tx_reset address : 0x3000_ 18 24 default value : na any value written to this address will re set the rx fifo. this register is wo. 6.6 i 2 c controller figure 12. i 2 c controller block diagram 6.6.1 overview the controller serves as an interface between the arm720 and the serial i 2 c bus. it provides multi-master functions, and controls all i2c bu s-specific sequencing, protocol, arbitration and timing. it supports fast i 2 c mode (400 khz). main features: parallel-bus/i 2 c protocol converter multi-master capability 7-bit addressing transmitter/receiver flag end-of-byte transmission flag transfer problem detection clock generation register array register array apb interface scl control sda control apb bus i 2 c bus
SPEAR-07-NC03 6 blocks description 127/194 i 2 c bus busy flag arbitration lost flag end of byte transmission flag transmitter/receiver flag start bit detection flag start and stop generation in addition to receiving and transmitting data, this interface converts it from serial to parallel format and vice versa, using either an interrupt or polled handshake. the interrupts can be enabled or disabled by software. the interface is connected to the i 2 c bus by a data pin (sdai) and by a clock pin (scli). it can be connected both with a standard i 2 c bus and a fast i 2 c bus. this selection is made by software. mode selection the interface can operate in the four following modes: ? slave transmitter/receiver ? master transmitter/receiver by default, it operates in slave mode. the interface automatically switches from slave to master after it generates a start condition and from master to slave in case of arbitrati on loss or a stop generation, this allows multi- master capability. communication flow in master mode, it initiates a data transfer and generates the clock signal. a serial data transfer always begins with a start condition and ends with a stop condition. both start and stop conditions are generated in master mode by software. the first byte following the start condition is the address byte; it is always transmitted in master mode. a 9th clock pulse follows the 8 clock cycles of a byte transfer, during which the receiver must send an acknowledge bit to the transmitter. figure 13. i 2 c bus protocol acknowledge may be enabled and disabled by software. the i 2 c interface address and/or general call address can be selected by software. the speed of the i 2 c interface may be selected between standard (0 - 100 khz) and fast i 2 c (100 - 400 khz).
6 blocks description SPEAR-07-NC03 128/194 sda/scl line control transmitter mode: the interface holds the clock line low before transmission to wait for the microcontroller to write the byte in the data register. receiver mode: the interface holds the clock line low after reception to wait for the microcontroller to read the byte in the data register. the scl frequency (fscl) is controlled by a programmable clock divider which depends on the i 2 c bus mode. when the i 2 c cell is enabled, the sda and scl ports must be configured as floating open-drain output or floating input. in this case, the value of the external pull-up resistance used depends on the application. 6.6.2 register map 6.6.3 register description all the registers are 8 bit wide and aligned at 32 bit. 6.6.3.1 control register mnemonic : cr address : 0x3000_1560 default value : 0x00 pe : peripheral enable. this bit is set and cleared by software. address register name access 0x3000_1560 cr rw 0x3000_1564 sr1 rw 0x3000_1568 sr2 rw 0x3000_156c ccr rw 0x3000_1570 oar rw 0x3000_1574 reserved ro 0x3000_1578 dr rw bit field name access 07:06 reserved ro 05 pe rw 04 engc rw 03 start rw 02 ack rw 01 stop rw 00 ite rw
SPEAR-07-NC03 6 blocks description 129/194 0: peripheral disabled 1: master/slave capability notes : ? when pe=0, all the bits of the cr register and the sr register except the stop bit are reset. all outputs are released while pe=0 ? when pe=1, the corresponding i/o pins ar e selected by hardware as alternate functions. ? to enable the i 2 c interface, write the cr register twice with pe=1 as the first write only activates the inte rface (only pe is set). engc : enable general call. this bit is set and cleared by software. it is also cleared by hardware when the interface is disabled (pe=0). the 00h general call address is acknowledged (01h ignored). 0: general call disabled 1: general call enabled start : generation of a start condition. this bit is set and cleared by software. it is also cleared by hardware when the interface is disabled (pe=0) or when the start condition is sent (with interrupt generation if ite=1). ? in master mode: 0: no start generation 1: repeated start generation ? in slave mode: 0: no start generation 1: start generation when the bus is free ack : acknowledge enable. this bit is set and cleared by software. it is also cleared by hardware when the interface is disabled (pe=0). 0: no acknowledge returned. 1: acknowledge returned after an address byte or a data byte is received. stop : generation of a stop condition. this bit is set and cleared by software. it is also cleared by hardware in master mode. note: this bit is not cleared when t he interface is disabled (pe=0). ? in master mode: 0: no stop generation. 1: stop generation after the current byte transfer or after the current start condition is sent. the stop bit is cleared by hardware when the stop condition is sent. ? in slave mode: 0: no stop generation. 1: release the scl and sda lines after the current byte transfer (btf=1). in this mode the stop bit has to be cleared by software.
6 blocks description SPEAR-07-NC03 130/194 ite : interrupt enable. this bit is set and cleared by software and cl eared by hardware when the interface is disabled (pe=0). 0: interrupts disabled 1: interrupts enabled 6.6.3.2 status register 1 mnemonic : sr1 address : 0x3000_1564 default value : 0x00 evf : event flag. this bit is set by hardware as soon as an event occurs. it is cleared by software reading sr2 register in case of error event. it is also cleared by hardware when the interface is disabled (pe=0). 0: no event 1: one of the following events has occurred: ? btf=1 (byte received or transmitted) ? adsl=1 (address matched in slave mode while ack=1) ? sb=1 (start condition generated in master mode) ? af=1 (no acknowledge received after byte transmission) ? stopf=1 (stop condition detected in slave mode) ?arlo=1 (arbitration lost in master mode) ? berr=1 (bus error, misplaced st art or stop condition detected) ? address byte successfully transmitted in master mode. tra : transmitter / receiver when btf is set, tra=1 if a data byte has been transmitted. it is cleared automatically when btf is cleared. it is also cleared by hardware after detection of stop condition (stopf=1), loss of bus arbitration (arlo=1) or when the interface is disabled (pe=0). bit field name access 07 evf ro 06 reserved ro 05 tra ro 04 busy ro 03 btf ro 02 adsl ro 01 m/sl ro 00 sb ro
SPEAR-07-NC03 6 blocks description 131/194 0: data byte received (if btf=1) 1: data byte transmitted busy : bus busy. this bit is set by hardware on detection of a start condition and cleared by hardware on detection of a stop condition. it indicates a communication in progress on the bus. this information is still updated when t he interface is disabled (pe=0). 0: no communication on the bus 1: communication ongoing on the bus btf : byte transfer finished. this bit is set by hardware as soon as a byte is correctly received or tr ansmitted with interrupt generation if ite=1. it is cleared by software re ading sr1 register followed by a read or write of dr register. it is also cleared by hardware when the interface is disabled (pe=0). ? following a byte transmission, this bit is set after reception of the acknowledge clock pulse. in case an address byte is sent, this bit is set only after the ev6 event. btf is cleared by reading sr1 register followed by writing the next byte in dr register. ? following a byte reception, this bit is set after transmission of the acknowledge clock pulse if ack=1. btf is cleared by reading sr1 register followed by reading the byte from dr register. the scl line is held low while btf=1. 0: byte transfer not done 1: byte transfer succeeded adsl : address matched (slave mode) this bit is set by hardware as soon as the received slave address matched with the oar register content or a general call is recognized. an interrupt is generated if ite=1. it is cleared by software reading sr1 register or by hardwa re when the interface is disabled (pe=0). the scl line is held low while adsl=1. 0: address mismatched or not received 1: received address matched m/sl : master/slave. this bit is set by hardware as soon as the interf ace is in master mode (writing start=1). it is cleared by hardware after detecting a stop condition on the bus or a loss of arbitration (arlo=1). it is also cleared when the interface is disabled (pe=0). 0: slave mode 1: master mode sb : start bit (master mode). this bit is set by hardware as soon as the start condition is generated (following a write start=1). an interrupt is generated if ite=1. it is cleared by software reading sr1 register followed by writing the address byte in dr register. it is also cleared by hardware when the interface is disabled (pe=0). 0: no start condition 1: start condition generated
6 blocks description SPEAR-07-NC03 132/194 6.6.3.3 status register 2 mnemonic : sr2 address : 0x3000_1568 default value : 0x00 af : acknowledge failure. this bit is set by hardware when no acknowledge is returned. an interrupt is generated if ite=1. it is cleared by software reading sr2 re gister or by hardware when the interface is disabled (pe=0). the scl line is not held low while af=1. 0: no acknowledge failure 1: acknowledge failure stopf : stop detection (slave mode). this bit is set by hardware when a stop condition is detected on the bus after an acknowledge (if ack=1). an interrupt is generated if ite=1. it is cleared by software reading sr2 register or by hardware when the interface is disabled (p e=0). the scl line is not held low while stopf=1. 0: no stop condition detected 1: stop condition detected arlo : arbitration lost. this bit is set by hardware when the interface loses the arbitration of the bus to another master. an interrupt is generated if ite=1. it is cleared by software reading sr2 register or by hardware when the interface is disabled (pe=0). after an arlo event the interface switches back automatically to slave mode (m/sl=0). the scl line is not held low while arlo=1. 0: no arbitration lost detected 1: arbitration lost detected berr : bus error. this bit is set by hardware when the interface detects a misplaced start or stop condition. an interrupt is generated if ite=1. it is cleared by software reading sr2 register or by hardware when the interface is disabled (pe=0). t he scl line is not held low while berr=1. 0: no misplaced start or stop condition 1: misplaced start or stop condition bit field name access 07:05 reserved ro 04 af ro 03 stopf ro 02 arlo ro 01 berr ro 00 gcal ro
SPEAR-07-NC03 6 blocks description 133/194 gcal : general call (slave mode). this bit is set by hardware when a general call address is detected on the bus while engc=1. it is cleared by hardware detecting a stop condition (stopf=1) or when the interface is disabled (pe=0). 0: no general call address detected on bus 1: general call address detected on bus 6.6.3.4 clock control register mnemonic : ccr address : 0x3000_156c default value : 0x00 sm/fm : fast/standard i 2 c mode. this bit is set and cleared by software. it is not cleared when the interface is disabled (pe=0). 0: standard i 2 c mode 1: fast i 2 c mode cc(6:0) : 7-bit clock divider. these bits select the speed of the bus (fscl) depending on the i 2 c mode. they are not cleared when the interface is disabled (pe=0). standard mode (fm/sm=0): fscl <= 100khz fscl = fcpu/(2x([cc6..cc0]+2)) fast mode (fm/sm=1): fscl > 100khz fscl = fcpu/(3x([cc6..cc0]+2)) note: the programmed fscl assumes no load on scl and sda lines. bit field name access 07 sm/fm rw 06:00 cc rw
6 blocks description SPEAR-07-NC03 134/194 6.6.3.5 own address register mnemonic : oar address : 0x3000_1570 default value : 0x00 add(7:1): interface address. these bits define the i 2 c bus address of the interface. they are not cleared when the interface is disabled (pe=0). dir : address direction bit. this bit is don't care, the interface acknowledges either 0 or 1. it is not cleared when the interface is disabled (pe=0). note : address 01h is always ignored. 6.6.3.6 data register. mnemonic : dr address : 0x3000_1578 default value : 0x00 d(7:0): 8 bit data register. these bits contain the byte received or to be transmitted on the bus. transmitter mode: byte transmission start automa tically when the software writes in the dr register. receiver mode: the first data byte is received automatically in the dr register using the least significant bit of the address. then, the next data bytes are received one by one after reading the dr register. 6.6.4 i 2 c functional description by default the i 2 c interface operates in slave mode (m/sl bit is cleared) except when it initiates a transmit or receive sequence. 6.6.4.1 slave mode as soon as a start condition is detected, the a ddress is received from the sda line and sent to the shift register; then it is compared with the address of the interface or the general call address (if selected by software). address not matched: the interface ignores it and waits for another start condition. bit field name access 07:01 add rw 00 dir rw bit field name access 07:00 d rw
SPEAR-07-NC03 6 blocks description 135/194 address matched: the interface generates in sequence: ? acknowledge pulse if the ack bit is set. ? evf and adsl bits are set with an interrupt if the ite bit is set. then the interface waits for a read of the sr1 register, holding the scl line low (see figure 8 transfer sequencing ev1). next, read the dr register to determine from th e least significant bit if the slave must enter receiver or transmitter mode. slave receiver following the address reception and after sr1 register has been read, the slave receives bytes from the sda line into the dr register via the internal shift register. after each byte the interface generates in sequence: ? acknowledge pulse if the ack bit is set ? evf and btf bits are set with an interrupt if the ite bit is set. then the interface waits for a read of the sr1 register followed by a read of the dr register, holding the scl line low (see figure 8) transfer sequencing ev2). slave transmitter following the address reception and after sr1 register has been read, the slave sends bytes from the dr register to the sda line via the internal shift register. the slave waits for a read of the sr1 register follo wed by a write in the dr register, holding the scl line low (see figure 8 transfer sequencing ev3). when the acknowledge pulse is received: ? the evf and btf bits are set by hardware with an interrupt if the ite bit is set. closing slave communication after the last data byte is transferred a stop co ndition is generated by the master. the interface detects this condition and sets: ? evf and stopf bits with an in terrupt if the ite bit is set. then the interface waits for a read of the sr2 register (see figure 3 transfer sequencing ev4). error cases ? berr: detection of a stop or a start condition during a byte transfer. in this case, the evf and the berr bits are set with an interrupt if the ite bit is set. if it is a stop then the interface discards the da ta, released the lines and waits for another start condition. if it is a start then the interface discards the data and waits for the next slave address on the bus. ? af: detection of a non-acknowledge bit. in this case, the evf and af bits are set with an interrupt if the ite bit is set. note: in both cases, scl line is not held low; ho wever, sda line can remain low due to possible "0" bits transmitted last. it is then necessa ry to release both lines by software. how to release the sda / scl lines set and subsequently clear the stop bit while btf is set. the sda/scl lines are released after the transfer of the current byte.
6 blocks description SPEAR-07-NC03 136/194 6.6.4.2 master mode to switch from default slave mode to master mode a start condition generation is needed. start condition and transmit slave address setting the start bit while the busy bit is cleare d causes the interface to switch to master mode (m/sl bit set) and generates a start condition. once the start condition is sent: ? the evf and sb bits are set by hardware with an interrupt if the ite bit is set. then the master waits for a read of the sr1 regi ster followed by a write in the dr register with the slave address byte, holding the scl line low (see figure 8 transfer sequencing ev5). then the slave address byte is sent to the sda line via the internal shift register. after completion of this transfers (and acknow ledge from the slave if the ack bit is set): ? the evf bit is set by hardware with in terrupt generation if the ite bit is set. then the master waits for a read of the sr1 regi ster followed by a write in the cr register (for example set pe bit), holding the scl line low (see figure 8 transfer sequencing ev6). next the master must enter receiver or transmitter mode. master receiver following the address transmission and after sr1 and cr registers have been accessed, the master receives bytes from the sda line into the dr register via the inter nal shift register. after each byte the interface generates in sequence: ? acknowledge pulse if if the ack bit is set ? evf and btf bits are set by hardware with an interrupt if the ite bit is set. then the interface waits for a read of the sr1 register followed by a read of the dr register, holding the scl line low (see figure 8 transfer sequencing ev7). to close the communication: before reading the la st byte from the dr register, set the stop bit to generate the stop condition. the interface goes automatically back to slave mode (m/sl bit cleared). note: in order to generate the non-acknowledge pulse after the last re ceived data byte, the ack bit must be cleared just before reading the second last data byte. master transmitter following the address transmission and after sr1 register has been read, the master sends bytes from the dr register to the sd a line via the internal shift register. the master waits for a read of the sr1 register followed by a write in the dr register, holding the scl line low (see figure 8 transfer sequencing ev8). when the acknowledge bit is received, the interface sets: ? evf and btf bits with an in terrupt if the ite bit is set. to close the communication: after writing the last byte to the dr register, set the stop bit to generate the stop condition. the interface goes automatically back to slave mode (m/sl bit cleared).
SPEAR-07-NC03 6 blocks description 137/194 error cases ? berr: detection of a stop or a start condition during a byte transfer. in this case, the evf and berr bits are set by hardware with an interrupt if ite is set. ? af: detection of a non-acknowledge bit. in this case, the evf and af bits are set by hardware with an interrupt if the ite bit is set. to resume, set the start or stop bit. ? arlo: detection of an arbitration lost condition. in this case the arlo bit is set by hardware (with an interrupt if the ite bit is set and the interface goes automatically back to sl ave mode (the m/sl bit is cleared). note : in all these cases, the scl line is not held low; however, the sda line can remain low due to possible "0" bits transmitted last. it is then necessary to release both lines by software. figure 14. transfer sequencing legend : s=start, p=stop, a=acknowledge, na=non-acknowledge evx=event (with interrupt if ite=1) ev1 : evf=1, adsl=1, cleared by reading sr1 register. ev2 : evf=1, btf=1, cleared by reading sr1 register followed by reading dr register. ev3 : evf=1, btf=1, cleared by reading sr1 register followed by writing dr register. ev3-1 : evf=1, af=1, btf=1; af is cleared by reading sr1 register. btf is cleared by releasing the ines (stop=1, stop=0) or by wr iting dr register (dr=ffh). note: if lines are released by stop=1, stop=0, the subsequent ev4 is not seen. ev4 : evf=1, stopf=1, cleared by reading sr2 register. ev5 : evf=1, sb=1, cleared by reading sr1 register followed by writing dr register. ev6 : evf=1, cleared by reading sr1 register fo llowed by writing cr register (for example pe=1). ev7 : evf=1, btf=1, cleared by reading sr1 register followed by reading dr register. ev8 : evf=1, btf=1, cleared by reading sr1 register followed by writing dr register.
6 blocks description SPEAR-07-NC03 138/194 6.7 dynamic memory controller figure 15. sdram cont roller block diagram 6.7.1 overview the dram controller block is an ahb slave used to provide an interface between the system bus and external memory device. the controller supports four external banks, containing either sdram or edo memories. memory components with 32, 16 and 8 bit data buses are supported. 6.7.2 memory access the dram controller supports single and burst accesses for both memory types. a single state machine and shared control si gnals are used for a memory access. 6.7.2.1 sdram access sdram accesses are performed with the pre-char ge command at the end of each access, i.e. banks are not kept open, as shown in figure 16 . figure 16. sdram access example ahb slave interface refresh timer memory driver data multiplexer ahb bus address control data apb slave interface and registers external bus interface apb bus static memory controller clk state data addr cs we cas ras row col0 col1 col15 idle setup clk state data addr cs we cas ras row col0 col1 col15 idle setup wait pre access access access wait pre access access access pre idle pre idle
SPEAR-07-NC03 6 blocks description 139/194 initially the row address is output and the misa (ras) and mics outputs are asserted. during the access state the column address is output on the address bus and the miaa (cas) output is asserted. when the memory access has completed the miaa and miwe outputs are asserted to pre-charge the accessed sdram bank. the sdram data accesses are not performed as a single burst. in each access cycle a new read/write command is issued to the sdram device, causing the column address to reload. to support this mode of operation, the sdram device must be configured to have a burst length of one. using a number of individual accesses allows the same location to be accessed in a number of consecutive access cycles e.g. during a byte burst access to a word wide memory bank. a sdram access is not permitted to cross a 512 byte boundary (the minimum supported sdram row size) without passing through the setup cycle to update the sdram row address. after the last access cycle of every transfer, the pre-charge command must be issued to the sdram. a feature of sdram read accesses is that there is some latency between the read access being initiated and the data being returned by the device. the data latency from the read command to the first valid data mu st be configured by the user. the memory interface is compatible with the intel "pc sdram specific ation" and only uses commands defined in that specification. 6.7.2.2 edo access an edo access is shown in figure 17 . figure 17. edo access example to support edo accesses an address setup cycle has been added to provide a cycle of setup between the row address output becoming valid and the ras signal being activated. also added is an access wait cycle, after each access cycle. the mics output is used as the edo ras signal. the dram controller must capture read data on the clock following the read access. the user must configure the single cycle data latency. clk state data addr we/oe cas ras row col0 col15 idle clk state data addr we/oe cas ras row col0 col15 idle access wait wait idle access wait wait idle col1 address setup setup access wait access wait access col1 address setup setup access wait access wait access
6 blocks description SPEAR-07-NC03 140/194 6.7.3 address mapping table table 14. dram address bus 6.7.4 external bus interface the external bus interface is used to share the address and data pads (pins) between the dram controller and the st atic memory controller. the handshaking between the ebi and the memory co ntroller consists of a two-wire interface, busreq and busgnt, both signals are active high. busreq is asserted by the memory controller indicating that it requires access to the bus to perform a transfer. when the ebi sees a busreq it responds with a busgnt active when the bus is available and can be granted to the memory controller. the ebi will wait for the currently granted memo ry controller to finish the access (i.e. to de- assert busreq) before it grants the next memory controller. therefore the memory controller must keep the busreq signal asserted as long as it requires the memory bus. the arbitration uses a fixed priority scheme. memory data width address column address width memory interface ou tput address bits ahb bus address 13 12 11 10 9 8 7 6 5 4 3 2 1 0 8 bits column ba ba ba 0 9 8 7 6 5 4 3 2 1 0 row 9 22 21 20 19 18 17 16 15 14 13 12 11 10 9 10 x 22 21 20 19 18 17 16 15 14 13 12 11 10 16 bits column ba ba ba 0 10 9 8 7 6 5 4 3 2 1 row 8 22 21 20 19 18 17 16 15 14 13 12 11 10 9 9 x 22 21 20 19 18 17 16 15 14 13 12 11 10 10 x x 22 21 20 19 18 17 16 15 14 13 12 11 32 bits column ba ba ba 0 11 10 9 8 7 6 5 4 3 2 row 8 x 22 21 20 19 18 17 16 15 14 13 12 11 10 9 x x 22 21 20 19 18 17 16 15 14 13 12 11 10 x x x 22 21 20 19 18 17 16 15 14 13 12
SPEAR-07-NC03 6 blocks description 141/194 6.7.5 register map 6.7.6 register description all the registers are 16 bit wide. 6.7.6.1 memory bank configuration register mnemonic : mb1config, mb2config, mb3config, mb4config address : 0x3000_2800, 0x3000_2804, 0x3000_2808, 0x3000_280c default value: 0x0000 dev_wid - define the data width of the external memory device: 00 byte (8 bit) 01 half word (16 bit) 10 word (32 bit) 11 reserved address register name access 0x3000_2800 mb1config r/w 0x3000_2804 mb2config r/w 0x3000_2808 mb3config r/w 0x3000_280c mb4config r/w 0x3000_2810 sdram1configlo ro 0x3000_2814 sdram1confighi ro 0x3000_2818 sdram2configlo ro 0x3000_281c sdram2confighi ro 0x3000_2820 sdram3configlo ro 0x3000_2824 sdram3confighi ro 0x3000_2828 sdram4configlo ro 0x3000_282c sdram4confighi ro 0x3000_2830 memconfig r/w 0x3000_2834 bank 1 size r/w 0x3000_2838 bank 2 size r/w 0x3000_283c bank 3 size r/w 0x3000_2840 bank 4 size r/w bit field name access 15:12 reserved ro 11:10 dev_wid rw 09:08 data_lat rw 07:05 setup_time rw 04:02 idle_time rw 01:00 sdram_col rw
6 blocks description SPEAR-07-NC03 142/194 data_lat - defines the number of memory clock cycles between the start of a memory read access and the first valid data. the datalat value is valid between 0 and 3. setup_time - defines the number of memory clock cycles the memory drivers spends in the decode state before accessing the external memory. the setuptime value is valid between 0 and 7. idle_time - defines the minimum time the memory driver must spend in the idle state following memory accesses. the value defines the number of memory clock cycles. the idletime value is valid between 0 and 7. sdram_col - specifies the width of the sdram column address: 00 8 bits 01 9 bits 10 10 bits 11 reserved 6.7.6.2 sdram configuration registers these registers are write only. a write access to the high register s will start the sdram configuration cycle, during which the value written to the regi ster will be as serted on the memory bus for a one clock period. after the power-up the cpu must configure ea ch sdram device, i.e. perform precharge- refresh-mode register set procedure as specified in the sdram device data sheet. mnemonic : sdram1configlo, sdram2configlo, sdram3configlo, sdram4configlo, address : 0x3000_2810, 0x3000_2818, 0x3000_2820, 0x3000_2828 default value : 0x0000 mnemonic : sdram1confighi, sdram2confighi, sdram3confighi, sdram4confighi address : 0x3000_2814, 0x3000_281c, 0x3000_2824, 0x3000_282c default value : 0x0000 bit field name access 15:14 reserved ro 13:00 miab wo bit field name access 15:03 reserved ro 02 miwe wo 01 miaa wo 02 misa wo
SPEAR-07-NC03 6 blocks description 143/194 miab - memory interface address bus miwe - memory interface write enable miaa - memory interface access active (ncas) misa - memory interface setup active (nras) 6.7.6.3 memory configuration register mnemonic : mem_config address : 0x3000_2830 default value : 0x0000 pwr_save - when set to '1', the following refresh cycle will put the memory in "self refresh" mode. the memory will exit the self-refre sh mode when this bi t is reset to '0'. type - define the memory type connected. 1 - sdram 0 - edo note : the four banks must be populated with the same type of memory. bxen - the bank enable bits are used to enable each bank separately. if an ahb transfer is accessing a disabled bank, th e dram controller will return the error response to the ahb master. 1 - enable 0 - disable refr - this value is used to determine the refresh period. the period can be set in the 1 us steps. bit field name access 15:14 reserved ro 13 pwr_save rw 12 type rw 11 b3en rw 10 b2en rw 09 b1en rw 08 b0en rw 07:00 refr rw refr refresh period 00000000 refresh is disabled 00000001 refresh period is 1us 00000010 refresh period is 2us ? 11111111 refresh period is 255us
6 blocks description SPEAR-07-NC03 144/194 6.7.6.4 bank size registers mnemonic: bank size 0, bank size 1, bank size 2, bank size 3 address: 0x3000_2834, 0x3000_2838, ox3000_283c, 0x3000_2840 default value: 0x0000 there are four registers of 16 bi ts each that specify, for each bank, its size. the size is defined parametrically as 2 step_size in our case 64kbytes steps, but it could be larger by increasing step_size in the dram package, also smaller step size are possible however step_size can not be smaller than 10. for 64kbytes size the bank[3:0]size registers have the organization below: table 15. memory bank size register where (size+1) represents the size of the bank in 64kbytes steps, that is: table 16. bank size field and its corresponding actual size 15 9 8 0 unused size size field (binary) bank actual size 0_0000_0000 1 x 64kbytes = 64kbytes 0_0000_0001 2 x 64kbytes = 128kbytes 0_0000_0010 3 x 64kbytes = 192kbytes . . . . . . 0_0000_1111 16 x 64kbytes = 1mbytes . . . . . . 0_0001_1111 32 x 64kbytes = 2mbytes . . . . . . 0_0011_1111 64 x 64kbytes = 4mbytes . . . . . . 0_0111_1111 128 x 64kbytes = 8mbytes . . . . . . 0_1111_1111 256 x 64kbytes = 16mbytes . . . . . . 1_1111_1111 512 x 64kbytes = 32mbytes
SPEAR-07-NC03 6 blocks description 145/194 6.8 static memory controller 6.8.1 sramc description the block is designed to control the data flow from the internal amba (advanced micro- controller bus architecture) ahb (advanced high-p erformance bus) bus to any static memory components (rom, sram and flash). length, setup and hold timings required to properly transfer data to external memory components are controllable by programming of in ternal registers, dedicated to each external memory space as is the external bus width. each internal register also contains a flag bit which informs the controller if a particular memory sp ace is accessible or not. sramc receives the hsel from the ahb decoder. the block contai ns 4 registers which are used to control 4 external regions: 2 (region 0 and 1) with programmable contiguous size for static memory 2 (region 2 and 3) for external i/o with fixed size 6.8.2 registers map and description all the registers are 16 bit wide. 6.8.2.1 region 0 control register mnemonic : reg0 address : 0x3000_2400 default value : 0b000_0000_0011_11xx size - define the region size in steps of 64 kb: 0x00 = 64 kb 0x01 = 128 kb ----- 0ff = 16 mb address register name access 0x3000_2400 reg0 r/w 0x3000_2404 reg1 r/w 0x3000_2408 reg2 r/w 0x3000_240c reg3 r/w bit field name access 15:08 size rw 07:06 reserved ro 05 enable rw 04:02 length rw 01:00 size r0
6 blocks description SPEAR-07-NC03 146/194 enable - this bit, when set to '1' and the cp u access this region, an external cycle is performed with the proper length as defined in the next field. if the cpu access the region when the enable bit is reset the external cycle is not performed and an error is sent to the cpu. length - this field define the strobe pulse width in term of clock cycle. size - this field define the data bus size to be used for this region. 00 = 8 bit 01 = 16 bit 10 = 32 bit 11 = reserved this field latch its contents during the rising ed ge of nreset through two external address line (see configuration register for more detail). 6.8.2.2 region 1 control register mnemonic : reg1 address : 0x3000_2404 default value : 0x001d the fields are exactly the same of the previous register. the unique difference is that in this register also the size field is programmable by cpu. note: when b_size differs from "00" then the external address bus shift right by1 bit: eadd[31:0]<="0" & int_eaddr[31:1]. when b_size = "00" there isn't left shift: eadd[31:0]<= int_eaddr[31:0] 6.8.2.3 region 2 and 3 control registers mnemonic : reg2, reg3 address : 0x3000_2408, 0x3000_240c default value : 0x001d we_setup - this field define the setup time of writ e enable assertion with respect to chip select assertion in term of clock cycles. note: the whole data access cycle (both for read and write) is: cs_length =we_setup+we_lenght+we_hold+2 we_hold - these 3 bits control the hold time of write enable de-assertion with respect to chip select de-assertion. the real we hold time is we_hold +1 clk bit field name access 15:12 reserved ro 11:09 we_setup rw 08:06 we_hold rw 05 enable rw 04:02 length rw 01:00 size rw
SPEAR-07-NC03 6 blocks description 147/194 enable - when set to '0' prevents assertion of the chip select signal for the regions controlled by these register. length - these 3 bits control the length of time that an access to the external memory region controlled by these register will take. size - define the effective external bus size for an access to these memory regions. 00 = 8 bit 01 = 16 bit 10 = 32 bit 11 = na note: note : "11" is not defined and no error condition exists for this case so responsibility lies with the programmer to ensure this never occurs. 6.9 shared sram controller figure 18. shared sram controller block diagram 6.9.1 overview this block is based on 2 sub blocks: 8kbyte static ram controller to manage access to the ram access to the ram is driven by a round robin arbiter, which receives requests from two agents: ahb master, i.e. internal cpu or dma (by ahb bus) external processor (by asyn chronous external bus). the 2 agents access the shared ram as a standard register located on its own address space, belonging to its proper bus (ahb and external asynchronous bus). shared ram access is synchronized to the 2 bus timings by means of the wait and nxpwait signals. if the access cannot be done immediately, these 2 signals put in wait state either the ahb bus agent or the external bus agent, resp ectively, until the action can be accomplished. in other words, request of accessing the ra m is done by simply accessing the addresses reserved to the shared ram itself, and the grant condition is indirectly flagged by either the nxpwait or wait signal de-assertion. the interrupt signal is used to perform the handshake between pncu and external processor. the output of this register is co mpared to the byte: "55h"; if the content of the register is equal to 55h, the interrupt is set low. ahb slave interface shared ram arbiter static ram 8kbyte external processor interface amba bus ext. processor
6 blocks description SPEAR-07-NC03 148/194 ahb agents can assert or de-assert interrupt to the external cpu by reading or writing the interrupt register inside the shared ram while t he external cpu can only read or clear this register. table 17. register map and description 6.9.1.1 8 kb shared sram mnemonic : shram address : 0x2100_0000 ~ 0x2100_1fff default value : unpredictable 6.9.1.2 interrupt request register mnemonic : irr address : 0x2100_2000 default value: 0xffff_ffff access by ahb agent (cpu or dma) ahb agent can access this register for reading or writing. no interrup t versus ahb interrupt controller is generated. writing 55h will set nxpirq interr upt external request active (n xpirq='0'). external interrupt request become inactive (nxpirq='1') when irr contents differs from 55h. access by external processor xcpu can access this register either for reading or clear. wr iting access to this address (a(13)='1', a(12:0) = don't care ) resets the interrupt (irr = ffh), regardless of the contents of the xpwdata data bus. address register name access 0x2100_0000 ~ 0x2100_1fff shram rw 0x2100_2000 irr r/w bit field name ahb agent access ext. processor access 31:08 reserved ro ro 07:00 irr rw rc
SPEAR-07-NC03 6 blocks description 149/194 6.9.2 external processor timings figure 19. spear net write timing diagram figure 20. spear net read timing diagram spear net specific requirements are as follows. 1. external processor and spear net are not synchronized so mclk of timing diagram is not absolute. 2. for safe handshaking, nxpwait should be asserted immediately after nxpcs assertion. 3. the wait latency is not defined so when read access it is safe to hold data output until nxpcs will be de-asserted. mclk address data nxpcs nxpwe nxpre nxpwait valid data valid address mclk address data nxpcs nxpwe nxpre nxpwait valid data valid address setup hold wait latency wait latency is not definite writing here is safe valid data mclk address data nxpcs nxpwe nxpre nxpwait valid address valid data mclk address data nxpcs nxpwe nxpre nxpwait valid address setup hold wait latency wait latency is not definite
6 blocks description SPEAR-07-NC03 150/194 6.10 dma controller figure 21. dma controller block diagram 6.10.1 overview the dma block has one dma channel and it's capable of servicing up to four data stream. two channels are offering memo ry to memory transfer capabilit y while the other two channels are only able to move data from i/o to memory or memory to i/o. the main differences between the two modes is that in case of me mory to memory transfer both the addresses (source and destination) are incremented during the transfer while in case of i/o to memory only the destination address in incremented. the three channels are: ch0: external request 0 ch1: external request 1 ch2: memory to memory ch3: memory to memory the priority between channels is fixed (ch0 has the highest and ch3 the lowest). counter register counter register counter register active channel fifo interrupt logic state machine request logic ahb data ahb address dma request dma acknoledge to apb slave to ahb master counter register counter register counter register counter register active channel fifo interrupt logic state machine request logic ahb data ahb address dma request dma acknoledge to apb slave to ahb master counter register
SPEAR-07-NC03 6 blocks description 151/194 6.10.2 register map channel address register name access ch0 0x3000_2000 dmasourcelow rw 0x3000_2004 dmasourcehigh rw 0x3000_2008 dmadestlo rw 0x3000_200c dmadesthigh rw 0x3000_2010 dmamax rw 0x3000_2014 dmactrl rw 0x3000_2018 dmasocurrlo ro 0x3000_201c dmasocurrhigh ro 0x3000_2020 dmadecurrlo ro 0x3000_2024 dmadecurrhigh ro 0x3000_2028 dmatcnt ro ch1 0x3000_2040 dmasourcelow rw 0x3000_2044 dmasourcehigh rw 0x3000_2048 dmadestlo rw 0x3000_204c dmadesthigh rw 0x3000_2050 dmamax rw 0x3000_2054 dmactrl rw 0x3000_2058 dmasocurrlo ro 0x3000_205c dmasocurrhigh ro 0x3000_2060 dmadecurrlo ro 0x3000_2064 dmadecurrhigh ro 0x3000_2068 dmatcnt ro ch2 0x3000_2080 dmasourcelow rw 0x3000_2084 dmasourcehigh rw 0x3000_2088 dmadestlo rw 0x3000_208c dmadesthigh rw 0x3000_2090 dmamax rw 0x3000_2094 dmactrl rw 0x3000_2098 dmasocurrlo ro 0x3000_209c dmasocurrhigh ro 0x3000_20a0 dmadecurrlo ro 0x3000_20a4 dmadecurrhigh ro 0x3000_20a8 dmatcnt ro
6 blocks description SPEAR-07-NC03 152/194 6.10.3 registers description 6.10.3.1 dma source registers mnemonic: dmasourcelow, dmasourcehigh these two 16 bit registers contain the 32 bit source base address for the next dma transfer. when the dma controller is enabled, the conten t of the source base address registers are loaded in the current source address registers. 6.10.3.2 dma destination registers mnemonic: dmadestlow, dmadesthigh these two 16 bit registers contain the 32 bit destination base address for the next dma transfer. when the dma controller is enabled, the content of the destination base address registers are loaded in the curr ent destination address registers. 6.10.3.3 dma maximum count register mnemonic: dmamax this register is programmed with the maximum data unit count of the next dma transfer. the data unit is equal to the source to dma data width (byte, half-word or word). when the dma controller is enabled, the content of the maximum count register is loaded in the terminal count register. ch3 0x3000_20c0 dmasourcelow rw 0x3000_20c4 dmasourcehigh rw 0x3000_20c8 dmadestlo rw 0x3000_20cc dmadesthigh rw 0x3000_20c0 dmamax rw 0x3000_20c4 dmactrl rw 0x3000_20c8 dmasocurrlo ro 0x3000_20cc dmasocurrhigh ro 0x3000_20c0 dmadecurrlo ro 0x3000_20c4 dmadecurrhigh ro 0x3000_20c8 dmatcnt ro common to all channels 0x3000_20f0 dmamask rw 0x3000_20f4 dmaclr wo 0x3000_20f8 dmastatus ro channel address register name access
SPEAR-07-NC03 6 blocks description 153/194 6.10.3.4 dma control register mnemonic: dmamax default value : 0x0000 dir: this bit defines the direction for the next transfer 0: peripheral to memory. 1: memory to peripheral. mem2mem : this bit is only used on ch2 and, in this channel, should be always set to '1'. desize and sosize : these fields define the bus width for the next transfer. since that a fifo is present inside dma different bus width can be set. 00 - byte (8 bit) 01 - half word (16 bit) 10 - word (32 bit) 11 - reserved soburst : this field defines the number of words in the peripheral burst. when the peripheral is the source, that is the number of (sowidth) words read in to the fifo before writing fifo contents to destination. when the peripheral is the destinat ion, the dma interface will automatically read the correct number of source words to compile an soburst of dewidth data. when stream 3 is configured as a memory-memory transfer, soburst relates to the source side burst length. values are given in the following table.. bit field name access 15:14 reserved ro 13 dir rw 12 reserved ro 11 mem2mem rw 10:09 reserved ro 08:07 desize rw 06:05 soburst rw 04:03 sosize rw 02 deinc rw 01 soinc rw 00 enable rw soburst value ahb burst type 00 single 01 4 incrementing 10 8 incrementing 11 16 incrementing
6 blocks description SPEAR-07-NC03 154/194 deinc : this bit is used to enable the current destination register increment after each source to dma data transfer. if the bit is set to '1', the current destination regi ster will be incremented. soinc : the soinc bit is used to enable the curr ent source register increment after each source to dma data transfer. if the bit is set to '1', the cu rrent source r egister will be incremented. enable : this bit enables the channel when set to '1'. 1 - dma enabled. 0 - dma disabled. 6.10.3.5 dma source current register mnemonic: dmasocurlow and dmasocurhigh the current source registers hold the current value of the source address pointer. the registers are 16 bit read only registers. the valu e in the registers is used as an ahb address in a source to dma data transfer over the ahb bus. if the soinc bit in the control regi ster is set to '1', the value in the curr ent source r egisters will be incremented as data are transferred from a source to the dma. the value will be incremented at the end of the address phase of the ahb bus transfer by the hsize value. if the soinc bit is '0', the curr ent source register will hold a same value during the whole dma data transfer. 6.10.3.6 dma destination current register mnemonic: dmadecurlow and dmadecurhigh the current destination registers hold the curr ent value of the destination address pointer. the registers are 16 bit read only registers. th e value in the registers is used as an ahb address in a dma to destination data transfer over the ahb bus. if the deinc bit in the control register is set to '1', the value in the curr ent destination registers will be incremented as da ta are transferred from the dma to a destination. the value will be incremented at the end of the address phase of the ahb bus transfer by the hsize value. if the deinc bit is '0', the current destination re gister will hold a same value during the whole dma data transfer. 6.10.3.7 dma current count register mnemonic: dmacurtcnt the terminal count register is a 16 bit read-onl y register. the register contains the number of data units remaining in the current dma transfer. the data unit is equal to the source to dma data width (byte, half-word or word). the register value is decremented every time data is transferred to the dma fifo. when the terminal count reaches zero, the fifo content is transferred to the destination and a dma transfer is finished.
SPEAR-07-NC03 6 blocks description 155/194 6.10.3.8 mask register mnemonic: dmamask default value : 0x0000 maskex : when set to '1' this bit enable the corresponding channel to generate interrupt when an error occurs during the transfer. maskx : when set to '1' this bit enable the corresponding channel to generate interrupt when the terminal count is reached. 6.10.3.9 dma clear register mnemonic: dmaclear clearex : writing '1' to this bit will clear errorintx flag in the status register and the interrupt will be de-asserted. clearx : writing '1' to this bit will clear intx flag in the status register and the interrupt will be de- asserted. bit field name access 15:08 reserved ro 07 maske3 rw 06 maske2 rw 05 maske1 rw 04 maske0 rw 03 mask3 rw 02 mask2 rw 01 mask1 rw 00 mask0 rw bit field name access 15:08 reserved ro 07 cleare3 wo 06 cleare2 wo 05 cleare1 wo 04 cleare0 wo 03 clear3 wo 02 clear2 wo 01 clear1 wo 00 clear0 wo
6 blocks description SPEAR-07-NC03 156/194 6.10.3.10 dma status register mnemonic: dmastatus default value : 0x0000 activex : the active3-0 flags are used to indicate if a data stream is transferring data. it is high if a data transfer is in progress. the active fl ags have the same as the enable bits in the data stream control register. errorintx : the errorint3-0 bits are the error interrup t flags. they are set when the data stream transfer was aborted by an error response on hresp by an ahb slave. when this occurs, the stream will be disabled until the enable bit is again set by software. intx : the int3-0 bits are the data stream interrupt fl ags. a data stream will set the interrupt flag when a data transfer has finished (the whole packet has been transferred to destination). bit field name access 15:12 reserved ro 11 active3 ro 10 active2 ro 09 active1 ro 08 active0 ro 07 errorint3 ro 06 errorint2 ro 05 errorint1 ro 04 errorint0 ro 03 int3 ro 02 int2 ro 01 int1 ro 00 int0 ro
SPEAR-07-NC03 6 blocks description 157/194 6.11 rtc figure 22. rtc block diagram 6.11.1 overview the rtc block combines a complete time-of-day clock with an alarm and a 9999-year calendar. the time is in 24 hour mode, and time /calendar values are st ored in binary-coded decimal format. the time-of-day, alarm and calendar, status and control registers can all be accessed via apb bus. the rtc provides also a self-isolation mode that is activated during power down: this feature allows the rtc to continue working even if main power supply isn't supplied to the rest of the chip. this is realized supplying separate power and clock connections. 6.11.2 register map address register name access 0x3000_0c00 time rw 0x3000_0c04 date rw 0x3000_0c08 alarm_time rw 0x3000_0c0c alarm_date rw 0x3000_0c10 control rw 0x3000_0c14 status rc oscillator 32.768khz prescaler second minute hour day month year apb i/f & register array interrupt self insulation layer
6 blocks description SPEAR-07-NC03 158/194 6.11.3 register description 6.11.3.1 time register mnemonic : time address : 0x3000_0c00 default value : 0x0000_0000 su : current value of seconds units in bcd format. st : current value of seconds tens in bcd format. miu : current value of minutes units in bcd format. mit : current value of minutes tens in bcd format. hu : current value of hours units in bcd format. ht : current value of hours tens in bcd format. note: if there is a pending write to this register (see status regi ster), a further write will be lost. 6.11.3.2 date register mnemonic : date address : 0x3000_0c04 default value : 0x0000_0000 bit field name access 31:22 reserved ro 21:20 ht rw 19:16 hu rw 15 reserved ro 14:12 mit rw 11:08 miu rw 07 reserved ro 06:04 st rw 03:00 su rw bit field name access 31:28 ym rw 27:24 yh rw 23:20 yt rw 19:16 yu rw 15:13 reserved ro 12 mt rw 11:08 mu rw 07:06 reserved ro 05:04 dt rw 03:00 du rw
SPEAR-07-NC03 6 blocks description 159/194 du : current value of day's units in bcd format. dt : current value of days tens in bcd format. mu : current value of month's units in bcd format. mt : current value of months tens in bcd format. yu : current value of year's units in bcd format. yt : current value of years tens in bcd format. yh : current value of years hundreds in bcd format. ym : current value of year's millennium in bcd format. note: if there is a pending write to this register (see status regi ster), a further write will be lost. 6.11.3.3 alarm time register mnemonic : alarm_time address : 0x3000_0c08 default value : 0x0000_0000 6.11.3.4 alarm date register mnemonic : alarm_date address : 0x3000_0c0c default value : 0x0000_0000 bit field name access 31:22 reserved ro 21:20 aht rw 19:16 ahu rw 15 reserved ro 14:12 amit rw 11:08 amiu rw 07 reserved ro 06:04 ast rw 03:00 asu rw bit field name access 31:28 aym rw 27:24 ayh rw 23:20 ayt rw 19:16 ayu rw 15:13 reserved ro 12 amt rw 11:08 amu rw 07:06 reserved ro 05:04 adt rw 03:00 adu rw
6 blocks description SPEAR-07-NC03 160/194 6.11.3.5 control register mnemonic : control address : 0x3000_0c10 default value : 0x0000_0000 ie : interrupt enable. if set to '1' an interrupt will be sent to the cpu when time and date registers are equal to the alarm_time and alarm_date. tb : time bypass (test only). when this bit is set to '1' the date counter will be driven directly with the prescaler output bypassing the time counter. pb : prescaler bypass (test only). when this bit is set to '1' the time co unter will be directly driven with the 32 khz coming from oscillator bypassing the prescaler. mask5 : when set to '1' the years co mpare will be forced to true. mask4 : when set to '1' the months compare will be forced to true. mask3 : when set to '1' the days compare will be forced to true. mask2 : when set to '1' the hours co mpare will be forced to true. mask1 : when set to '1' the minutes compare will be forced to true. mask0 : when set to '1' the seconds compare will be forced to true. bit field name access 31 ie rw 30:10 reserved ro 09 tb rw 08 pb rw 07:06 reserved ro 05 mask5 rw 04 mask4 rw 03 mask3 rw 02 mask2 rw 01 mask1 rw 0 mask0 rw
SPEAR-07-NC03 6 blocks description 161/194 6.11.3.6 status register mnemonic : status address : 0x3000:0c14 default value : 0x0000_0000 int : interrupt request. writing '1' will reset the flag. ld : write to date register lost. if a second write is request to date register before the first is competed, this second request is aborted and ld bit is asserted. this bit is cleared when a write to date register is performed successfully. lt : write to time register lost. if a second write is request to time regist er before the first is competed, this second request is aborted and lt bit is asserted. this bit is cleared when a write to time register is performed successfully. pd : pending write to date register. this bit indica tes that a write request to date register is asserted from 48 mhz part to 32 khz part. it is independent from pt. a new write can be successfully requested only when this bit is de-asserted. pt : pending write to time register. this bit indica tes that a write request to time register is asserted from 48 mhz part to 32 khz part. a new write can be successfully requested only when this bit is de-asserted. rc : rtc connected. when reset to '0' the timer will be self-iso lated from the other blocks. reading and writing to time and date can be safely done only when this bit is set to '1'. bit field name access 31 int rc 30:06 reserved ro 05 ld ro 04 lt ro 03 pd ro 02 pt ro 01 reserved ro 00 rc ro
6 blocks description SPEAR-07-NC03 162/194 6.12 timer/counter figure 23. timer/counter block diagram 6.12.1 overview two channels constitute the gpt and each one co nsists of a programmable 16 bits counter and a dedicated 8 bits timer clock prescaler. the programmable 8-bit prescaler unit performs a clock division by 1, 2, 4, 8, 16, 32, 64, 128, and 256. two different interrupts can be generated for each timer: ? toggle ?interval two modes of operations are available for each timer: ? auto-reload mode ? single-shot mode 6.12.1.1 auto reload mode when the timer is enabled, the counter is cleare d and starts incrementing. when it reaches the compare register value, an interrupt source is activated the counter is automatically cleared and restarts incrementing. the process is repeated until the timer is disabled. 6.12.1.2 single shot mode when the timer is enabled, the counter is cleare d and starts incrementing. when it reaches the compare register value, an interrupt source is activated, the counter stopped and the timer disabled. channel 2 channel 1 8 bit prescaler 16 bit counter/timer 8 bit prescaler 16 bit counter/timer interrupt management control registers array apb i/f slave sysclk capture signals
SPEAR-07-NC03 6 blocks description 163/194 6.12.2 registers map 6.12.3 registers description all registers are 16 bit wide and 32 bit aligned. 6.12.3.1 timer control register mnemonic : timer_control1, timer_control2 address : 0x3000_0480 (timer 1) and 0x3000_0500 (timer 2) default value : 0x0000 match_int : if set enables the interrupti on when the comparator matches. capture : capture configuration bits: mode : when set single-shot mode is enabled. when reset auto-reload mode is enabled. address register name access 0x3000_0480 timer_control1 rw 0x3000_0484 timer_status1 ro 0x3000_0484 timer_int_ack1 wo 0x3000_0488 timer_compare1 rw 0x3000_048c timer_count1 ro 0x3000_0500 timer_control2 rw 0x3000_0504 timer_status2 ro 0x3000_0504 timer_int_ack2 wo 0x3000_0508 timer_compare2 rw 0x3000_050c timer_count2 ro bit field name access 15:09 reserved ro 08 match_int rw 07:06 reserved ro 05 enable rw 04 mode rw 03:00 prescaler rw
6 blocks description SPEAR-07-NC03 164/194 prescaler : prescaler configuration (consider ed a clock frequency of 48mhz): note: enable and disable after reset timer is disabled and all interrupt sources are masked. when a timer is enabled, an initialization phase is performed before starting to count; during that initialization phase, the capture registers and the counter are cleared. when a timer is disabled, the capture registers and the counter are frozen. 6.12.3.2 timer status register mnemonic : timer_status1 and timer_status2 address : 0x3000_0484 (timer 1) and 0x3000_0504 (timer 2) default value : 0x0000 this register indicates the raw interrupt sources status, prior any mask setting. redge : when set a rising edge has been detected on the capture input. fedge : when set a falling edg e has been detected on the capture input. match : when set a match has occurred in the compare unit. 6.12.3.3 timer interrupt acknowledge register mnemonic : timer_int_ack1 and timer_int_ack2 address : 0x3000_0484 (timer 1) and 0x3000_0504 (timer 2) value division frequency resolution max time 0000 /1 48 mhz 20.8 ns 1.365 ms 0001 /2 24 mhz 41.6 ns 2.73 ms 0010 /4 12 mhz 83.3 ns 5.46 ms 0011 /8 6 mhz 166.7 ns 10.922 ms 0100 /16 3 mhz 333.3 ns 21.845 ms 0101 /32 1.5 mhz 666.7 ns 43.69 ms 0110 /64 750 khz 1333 ns 87.381 ms 0111 /128 375 khz 2663 ns 174.529 ms 1000 /256 187.5 khz 5333 ns 349.525 ms 1001:1111 not allowed not allowed not allowed not allowed bit field name access 15:03 reserved ro 02 redge ro 01 fedge ro 00 match ro
SPEAR-07-NC03 6 blocks description 165/194 default value : 0x???? this register allows the software to clear the interrupt sources. match : writing a '1' clears the bit. writing a '0' hasn't effect. note: pending interrupts independently by the timer activity, pending interruptions remain active until they have been acknowledged. they are not automatically deactivate d when the timer is disabled or enabled. it is therefore strongly recommended to acknowledge all active interrupt sources before enabling a timer. 6.12.3.4 compare register mnemonic : timer_compare1 and timer_compare2 address : 0x3000_0488 (timer 1) and 0x3000_0508 (timer 2) default value : 0xffff this register allows the software to program the timer period. in auto-reload mode, when the counter has reached the compare value, it is cleared and restarts incrementing: timer_period = (compare_value - 1) x counter_period + 2 timer_clk periods min value: 0001h max value: ffffh (in auto-reload mode this value means free running) 6.12.3.5 timer count register mnemonic : timer_count1 and timer_count2 address : 0x3000_048c (timer 1) and 0x3000_050c (timer 2) default value : 0x0000 this register indicates the current counter value. bit field name access 15:01 reserved ro 00 match ro bit field name access 15:00 compare_value rw bit field name access 15:00 count_value ro
6 blocks description SPEAR-07-NC03 166/194 6.13 watch-dog timer figure 24. watch-dog timer block diagram 6.13.1 overview the wt is based on a programmable 8 bit counter and generates an hot reset (single pulse) when it overflows. the counter is clocked by a signal coming from a 21 bit prescaler clocked by the system clock. the step for the counter is 43.69 ms (1/48000000) * 2^21). when enabled the counter start and, as soon the limit is reached, a reset will be sent to the system. to avoid it the cpu has to restart the counter in a given time (less than the value written inside register multiplied for 43.69 ms). 6.13.2 register map 6.13.3 register description all registers are 16 bit wide and 32 bit aligned. 6.13.3.1 watch-dog control register mnemonic : wdog_control address : 0x3000_0800 default value : 0x0004 address register name access 0x3000_0800 wdog_control rw 0x3000_0804 wdog_status ro 0x3000_0808 wdog_max_cnt rw 0x3000_080c wdog_counter ro bit field name access 15:04 reserved ro 21 bit prescaler 8 bit counter control register array powergood hclk apb i/f nreset
SPEAR-07-NC03 6 blocks description 167/194 fast : when set the elapsing time of the counter w ill by divided by 16. th is mode is used only for testing purposes. debug_frz : when this bit is set and the cpu is in debug mode the watch-dog timer will freeze its contents. this feature allow the user to stop the cpu activity using break avoiding unexpected reset. enab : when set the wt is enabled; when it is cleared the prescaler and the counter are cleared and they don't start to count until the enab bit is set again. clear : when set the internal counter and prescaler ar e cleared. so the wt will be restarted. the hardware automatically clears this bit after the software has set it. 6.13.3.2 watch-dog status register mnemonic : wdog_status address : 0x3000_0804 default value : 0x0000 this register allows the software reset handler to determine the reset source. wd_res : set when a wt reset is occurred. to clea r this bit the software must write a "0". writing a "1" has not effect. 6.13.3.3 watch-dog m aximum count register mnemonic : wdog_max_cnt address : 0x3000_0808 default value : 0x0000 maxcnt_value : programmable value for 8-bit counter clocked with the 21 bit prescaler output. when maxcnt_value + 1 is reached wt generates the hot reset. 6.13.3.4 watch-dog counter register mnemonic : wdog_counter 03 fast rw 02 debug_frz rw 01 enab rw 00 clear rw bit field name access 15:01 reserved ro 00 wd_res ro bit field name access 15:08 reserved ro 07:00 maxcnt_value rw
6 blocks description SPEAR-07-NC03 168/194 address : 0x3000_080c default value : 0x0000 counter_cvalue : current 8 bit counter value. 6.14 interrupt controller figure 25. interrupt controller block diagram 6.14.1 overview the interrupt controller provides a simple software interface to the interrupt system. in an arm system, two levels of interrupt are available: nfiq (fast interrupt request) for fast, low latency interrupt handling nirq (interrupt request) for more general interrupts ideally, in an arm system, only a single nfiq so urce would be in use at any particular time. this provides a true low-latency interrupt, because a single source ensures that the interrupt service routine may be executed directly with out the need to determine the source of the interrupt. it also reduces the interrupt latency because the extra banked registers, which are available for fiq interrupts, may be used to maximum efficiency by preventing the need for a context save. the interrupt controller manages 11 interrupt sources. for each source, is possible to select which event is to be considered as the active one: level (active low or high), rising edge, falling edge or both. is also possible to choose if each requ est will be asserted to the arm as fiq or irq. the interrupt requests are stored into the "pending_reg" register. the output of this register is combined by logical "or" to the software interrupts stored in the "soft_interrupt_reg" register but the software interrupts are not stored in the pending register. bit field name access 15:08 reserved ro 07:00 counter_cvalue ro interrupt switch matrix irq0 irq10 apb i/f control register array fast interrupt (fiq) normal interrupt (irq)
SPEAR-07-NC03 6 blocks description 169/194 resulting requests can be masked by using the "e nable_reg" register. global enable/disable of both nirq and nfiq is done by the "cntrl_reg" register. note: an event on input "i" (int_req(i) ) causes an interrupt request on nirq (or nfiq) if: 1 the event at the input int_req(i) is a valid event (rising edge, fallin g edge, both or right level), as programmed in the related nibble of config_xx_xx_reg register. 2 request (i) is enabled on enable_reg register (enable_reg(i) = '1') 3 request(i) is routed onto nirq (nfiq) by its nibble in config_xx_xx_reg register. 4 nirq request is enabled by cntrl register cntrl(0)='1'. 6.14.2 register map 6.14.3 register description all the registers are 32 bit wide. 6.14.3.1 control register mnemonic : control address : 0x3000_0000 default valu e: 0x0000_0000 fiq_en : nfiq global enable. it's an active high bit and when '1' enables the nfiq itc output. address register name access 0x3000_0000 control rw 0x3000_0004 irq_status ro 0x3000_0008 fiq_status ro 0x3000_000c pending rc 0x3000_0010 config_1 rw 0x3000_0014 config_2 rw 0x3000_0018 reserved ro 0x3000_001c reserved ro 0x3000_0020 enable rw 0x3000_0024 reserved ro 0x3000_0028 reserved ro 0x3000_002c reserved ro 0x3000_0030 soft_interrupt rw bit field name access 31:02 reserved ro 01 fiq_enable rw 00 irq_enable rw
6 blocks description SPEAR-07-NC03 170/194 irq_en : nirq global enable. it's an active high bit and when '1' enables the nirq itc output.
SPEAR-07-NC03 6 blocks description 171/194 6.14.3.2 irq status register mnemonic : irq_status address : 0x3000_0004 default value : 0x0000_0000 this register allows the software interrupt handler to determine the nirq interrupt source. each request is considered to be active high. int_i: interrupt request number "i" status. if this bit is '0' it means that the request is not active. if the bit is '1' it means that 1) either the input int_req(i) a) is pending and b) has been routed to the nirq output and c) has been enabled 2) or the software interrupt i a) has been set b) has been routed to the nirq output and c) has been enabled bit field name access 31:11 reserved ro 10 int_10 ro 09 int_09 ro 08 int_08 ro 07 int_07 ro 06 int_06 ro 05 int_05 ro 04 int_04 ro 03 int_03 ro 02 int_02 ro 01 int_01 ro 00 int_00 ro
6 blocks description SPEAR-07-NC03 172/194 6.14.3.3 fiq st atus register mnemonic : fiq_status address : 0x3000_0008 default value : 0x0000_0000 this register allows the software interrupt handler to determine the nfiq interrupt source. each request is considered to be active high. int_i: interrupt request number "i" status. if this bit is '0' it means that the request is not active. if the bit is '1' it means that 1) either the input int_req(i) a) is pending and b) has been routed to the nfiqq output and c) has been enabled 2) or the software interrupt i a) has been set and b) has been routed to the nfiq output and c) has been enabled bit field name access 31:11 reserved ro 10 int_10 ro 09 int_09 ro 08 int_08 ro 07 int_07 ro 06 int_06 ro 05 int_05 ro 04 int_04 ro 03 int_03 ro 02 int_02 ro 01 int_01 ro 00 int_00 ro
SPEAR-07-NC03 6 blocks description 173/194 6.14.3.4 interrupt pending register mnemonic : pending address : 0x3000_000c default value : 0x0000_0000 this register stores the reques ts coming from input agents only. the request is stored even though the corresponding "enable_reg" bit is not active. int_i : active "high": if the bit pending_reg(i) is '1', it means that 1 interrupt request was recognized on int_req(i). this register can be cleared bit by bit by writing '1' in the corresponding bit. writing '0' doesn't change the bit value. note: a read operation doesn't change the value of the register. a write with '0' of bit "i" doesn't change the value of the bit. 6.14.3.5 configuration registers mnemonic : config_1 address : 0x3000_0010 default value : 0x0000_0000 bit field name access 31:11 reserved ro 10 int_10 rc 09 int_09 rc 08 int_08 rc 07 int_07 rc 06 int_06 rc 05 int_05 rc 04 int_04 rc 03 int_03 rc 02 int_02 rc 01 int_01 rc 00 int_00 rc bit field name access 31:28 conf_7 rw 27:24 conf_6 rw 23:20 conf_5 rw 19:16 conf_4 rw 15:12 conf_3 rw 11:08 conf_2 rw 07:04 conf_1 rw 03:00 conf_0 rw
6 blocks description SPEAR-07-NC03 174/194 mnemonic : config_2 address : 0x3000_0014 default value : 0x0000_0000 the registers are organized nibble-by-nibble: each nibble refers to the corresponding "int_req(i)" input. bit(2:0) of each nibble set which event is recognized as interrupt request (see the following table). bit(3) of each nibble sets which kind of inte rrupt will be stated to arm ("0":irq ; "1":fiq). 6.14.3.6 enable register mnemonic : enable address : 0x3000_0020 default value : 0x0000_0000 bit field name access 31:12 reserved ro 11:08 conf_10 rw 07:04 conf_9 rw 03:00 conf_8 rw b2 b1 b0 purpose 0 0 0 int_req(i) completely masked. (default) 0 0 1 int_req(i) is falling edge sensitive. 0 1 0 int_req(i) is rising edge sensitive. 0 1 1 int_req(i) is both edges sensitive. 1 - 0 int_req(i) is level sensitive, active low. 1 - 1 int_req(i) is level sensitive, active high. bit field name access 31:11 reserved ro 10 int_10 rw 09 int_09 rw 08 int_08 rw 07 int_07 rw 06 int_06 rw 05 int_05 rw 04 int_04 rw 03 int_03 rw 02 int_02 rw 01 int_01 rw 00 int_00 rw
SPEAR-07-NC03 6 blocks description 175/194 this register enables the input interrupt requests bit by bit. en(i): active high enable bit for input int_req(i). bit "i" = 1 means that request "i" is enabled. bit "i" = 0 means that request "i" is masked 6.14.3.7 software interrupt register mnemonic : soft_interrupt address : 0x3000_0030 default value : 0x0000_0000 this register allows to sets soft interrupts. it's intended for debugging purposes and allows the user to simulate an interrupt request on each of the 11 interrupt channels. si_i : active high, soft interrupt on channel i. when '0', no soft interrupt is set. if '1', the soft interrupt is active and the itc logic will react as if the input int_req(i) was set. each interrupt request can be cleared just writing "0" on the corresponding bit. bit field name access 31:11 reserved ro 10 si_10 rw 09 si_09 rw 08 si_08 rw 07 si_07 rw 06 si_06 rw 05 si_05 rw 04 si_04 rw 03 si_03 rw 02 si_02 rw 01 si_01 rw 00 si_00 rw
6 blocks description SPEAR-07-NC03 176/194 6.14.4 interrupt table the following table show the connection of th e 11 interrupt sources inside spear net and the proper setting that should be used for each particular interrupt. 6.15 gpio figure 26. gpio block diagram 6.15.1 overview the gpio block consists of 6 general purpos e io's which are configured by means of a dedicated direction register. the gpio block ac ts as a buffer between the io pads and the processor core. data is stored in the gpio block and can be wr itten to and read from by the processor via the apb bus. interrupt number agent interrupt name description 0 ethernet mac mac active high. 1 usb usb active low. 2 ieee1284 ieee1284 active high. 3 i2c i2c active high. 4 uart uart active high. 5 rtc rtc active high. 6 timer1 timer1 active low. 7 timer2 timer2 active low. 8 external nxirq(0) active low. 9 external nxirq(1) active low. 10 dma dma active high. abp i/f control register array apb bus gpi/o lines
SPEAR-07-NC03 6 blocks description 177/194 6.15.2 register map 6.15.3 registers description 6.15.3.1 general purpose i/o direction register mnemonic : gpp_dir address : 0x3000_1000 default value : 0x3f dir(5:0) : when set to '1' the io pin is configured as an input. when set to '0' the io pin is configured as an output. address register name access 0x3000_1000 gpp_dir rw 0x3000_1004 gpp_din ro 0x3000_1010 gpp_dout0 wo 0x3000_1014 gpp_dout1 wo 0x3000_1018 gpp_dout2 wo 0x3000_101c gpp_dout3 wo 0x3000_1020 gpp_dout4 wo 0x3000_1024 gpp_dout5 wo bit field name access 07:06 reserved ro 05 dir5 rw 04 dir4 rw 03 dir3 rw 02 dir2 rw 01 dir1 rw 00 dir0 rw
6 blocks description SPEAR-07-NC03 178/194 6.15.3.2 general purpose i/o input data register mnemonic : gpp_din address : 0x3000_1004 default value : na din(5:0) : value of the gpio pins. 6.15.3.3 general purpose i/ox output data register mnemonic : dout(5:0) address : 0x3000_1010 (gpio0), 0x3000_101 4 (gpio1), 0x3000_1018 (gpio2), 0x3000_101c (gpio3), 0x3000_1020 (gpio4), 0x3000_1024 (gpio5) default value 0x00 dout : its value will appear on the gpio pi n if the direction bit is set to '0'. bit field name access 07:06 reserved ro 05 din5 ro 04 din4 ro 03 din3 ro 02 din2 ro 01 din1 ro 00 din0 ro bit field name access 07:01 reserved ro 00 dout wo
SPEAR-07-NC03 6 blocks description 179/194 6.16 reset and clock controller 6.16.1 overview the reset clock generator provides the clock and reset signals for the spear net core. it also produces a refresh signal for dram. the reference clock frequency is 25 mhz. this signal is used to generate the 48 mhz system clock by an internal pll. clock signals for u sb and ieee blocks are provided separately. they can be stopped by the control signals "enabl e_usb_clk" and "ieee1xp0" in order to save power. usb 12 mhz clock is generated by dividing the 48 mhz usb clock by 4. refresh signal is generated by dividing 48 mhz by 48, and it is used by the refresh timer. input global reset is connected to powergood pin. it's supposed to be active low and asynchronous. it must be kept active until the pll is locked (in example, for 50 us). the second input reset signal comes from watch dog, and acts on all of the other blocks, causing an active pulse 200 clock cycles long (48 mhz). output reset signal is synchronized on 48 mhz clock. 12 mhz clock domain has its proper reset synchronization circuit (inside usb block). 6.17 pll (frequency synthesizer) figure 27. pll block diagram 6.17.1 overview the pll is based upon the charge pump principle. in consist of mainly 5 blocks: 1) input (pre) divider 2) phase/ frequency comparator 3) voltage controller oscillator 4) feedback divider 5) post divider. pre-divider : in spear net this divider is set to 25. input divider phase comparator feedback divider vco post divider from oscillator sysclk
6 blocks description SPEAR-07-NC03 180/194 phase/frequency comparator : this comparator drives trou gh a low pass filter the vco control imput. vco : in spear net the vco runs at 48 mhz. feedback divider : in spear net this divider is set to 48. post divider : in spear net this divider is set to 1. according to the setting on the three divide rs the system frequency, connecting a 25 mhz crystal will be: f out = 2 * feedback divider *f in / (pre divider) * 2 post divider ) then the system clock will be: f out = 2 * 48 * 25 / (25 * 21) = 48 mhz this means that the cpu, the system bus an d also the external dram will run at this frequency. 6.17.2 global configuration block the global configuration block includes the system configuration registers, the system control/ status registers and the shared me mory control/status registers. the system configuration registers sample the value presented at the add lines during the power- on reset phase. this reset phase is caused by the powergood signal driven low. during this phase the add lines are configured as input; there should be resistances on the board to drive the add lines with a weak high or low signal that will be latched on the registers and will configure the system hardware and possibly the so ftware. the pll_bypass and the jtag_enable_n conditions are propagated to the system even before the powergood signal is asserted, to guarantee a proper setup in every case and to allow usage of jtag before any clock cycle is completed. when jtag_enable_n is driven low the pins in the first column of table 1, "pin mapping for jtag interface", on page 2 change their function as defined in the second column. 6.17.3 register map address register name access 0x3000_1c00 fw_cfg 0x3000_1c04 hw_cfg 0x3000_1c08 global_control 0x3000_1c0c global_status 0x3000_1c10 shram_test_ctrl 0x3000_1c14 shram_test_status
SPEAR-07-NC03 6 blocks description 181/194 6.17.4 registers description all the register in this block are 8 bit wide and 32 bit aligned. 6.17.4.1 firmware co nfiguration register mnemonic : fw_cfg address : 0x3000_1c00 default value : na this register holds the value of eight address lines after the poweron reset. fw_cfg(7-0) add(14-7) 6.17.4.2 hardware c onfiguration register mnemonic : hw_cfg address : 0x3000_1c04 default value : na sdram_type : this bit holds the value of the onboard configuration pull-up/pull-down resistance connected to pad add[22]. when high dynamic memory controller is configured to drive an sdram, when low it drives an edo dram. bit field name access 07 fw_cfg7 ro 06 fw_cfg6 ro 05 fw_cfg5 ro 04 fw_cfg4 ro 03 fw_cfg3 ro 02 fw_cfg2 ro 01 fw_cfg1 ro 00 fw_cfg0 ro bit field name access 07 sdram_type ro 06 usb_clk_en ro 05 ieee_xp ro 04 rom_bsize ro 03 jtag_enable ro 02 pll_bypass ro 01-00 reserved ro
6 blocks description SPEAR-07-NC03 182/194 usb_clk_en : this bit holds the value of the onboard configuration pull-up/pull-down resistance connected to pad add[21]. when low the usb clock is disabled for power consumption reduction ieee_xp : this bit holds the value of the on-board configuration pull-up/pull-down resistance connected to pad add[20]. when low the shared memory controller drives the corresponding device pads, the ieee1284 block clock is disabl ed to reduce power c onsumption and the ahb decoder maps the ieee memory area to default slave. when high the ieee1284 block is clocked and mapp ed and has the control of xpdata[7:0] and xpaddr[7:0] pads as in following table. table 18. pin mapping fo r ieee1284 interface rom_bsize : this bit holds the value of the onboard configuration pull-up/pull-down resistor connected to pad add[19]. when high the static memory controller access to bank 0 expecting a 16 bit memory; when low accesses to bank 0 are performed considering an 8 bit memory chip. jtag_enable : this bit holds the value of the on-board configuration pull-up/pull-down resistance connected to pad add[18]. when hi gh the rcs[1] and ecs[1] pads are connected to the static memory controller block and th e nras[3], nras[2] and nr as[1] pads are driven by dynamic memory controller. when low these pads are connected to the arm jtag interface as described in the following table. ball function when ieee_xp = ?1 ? function when ieee_xp = ?0? d14 xpdata(0) ppdata(0) e11 xpdata(1) ppdata(1) d13 xpdata(2) ppdata(2) b14 xpdata(3) ppdata(3) c13 xpdata(4) ppdata(4) c12 xpdata(5) ppdata(5) b13 xpdata(6) ppdata(6) b12 xpdata(7) ppdata(7) d9 xpadd(1) nstrobe c9 xpadd(2) nack a8 xpadd(3) busy e8 xpadd(4) perror d8 xpadd(5) select c8 xpadd(6) nautofd e7 xpadd(7) nfault d7 xpadd(8) ninit b7 xpadd(9) selectin c7 xpadd(10) pdatadir
SPEAR-07-NC03 6 blocks description 183/194 table 19. pin mapping for jtag interface pll_bypass : this bit holds the value of the o nboard configuration pull-up/pull-down resistance connected to pad add[17]. when hi gh the internal pll is bypassed and the mclki pad signal is used instead of pll output. 6.17.4.3 global control register mnemonic : global_control address : 0x3000_1c08 default value : 0x00 usb_enable : when low gpio pads are driven by gpio block and xpaddr[10] and xpaddr[11] pads drive the shared memory controller. when high gpio pads are driven by the usb block and xpaddr[10] and xpaddr[11] drive the usb block (instead of the internal transceiver). this signal should be driven high only when spear net global control register bit 0 (which has higher priority) is set. note: this bit is only intended for debug purpose. the following table shows the ball mapping for this mode. table 20. pin mapping for nusb_enable ball function when jtag_enable = ?1 ? function when jtag_enable = ?0? p12 necs1 tck p14 nrcs1 tms m9 nras1 tdi k9 nras2 tdo p9 nras3 ntrst bit field name access 07:02 reserved ro 01 nusb_enable rw 00 ni2c_enable rw ball function when nusb_enable = ?1 ? function when nusb_enable = ?0? a3 gpio0 oe b4 gpio1 rcv a2 gpio2 suspend a1 gpio3 speed b3 gpio4 vo c3 gpio5 fse0 xpadd11 vp xpadd12 vm
6 blocks description SPEAR-07-NC03 184/194 i 2 c_enable : when low pad gpio[4] and pad gpio[5] are respectively i 2 c scl and sda open drain signals driven by i 2 c block. when high pad gpio[4] and pad gpio[5] are connected to gpio block or to usb block dependi ng on the value of pncu control register bit 1. the following table shows the pin mapping for this mode. table 21. pin mapping for ni 2 c_enable 6.17.4.4 global status register mnemonic : global_status address : 0x3000_1c0c default value : 0x00 pll_lock : when the internal pll is locked this bit is high. 6.17.4.5 shared ram t est control register mnemonic : shram_test_ctrl address : 0x3000_1c10 default value : 0x00 (*) to write to this register user should first disable the protection, i.e. write a signature value (45h) to the same address of shram_test_ctrl. writing in any location in the apb domain (shramc_ctrl included) re-enables the protection. em_bist_start : this signal drives the shared memory bist (built in self test) engine. when high the bist starts testing the memory. user should not use the shared memory when the bist is active. csn_shram : this bit enables the shared memory chip select signal. when high the memory is disabled. ball function when ni 2 c_enable = ?1? function when ni 2 c_enable = ?0? b3 gpio4 scl c3 gpio5 sda bit field name access 07:01 reserved ro 00 pll_lock ro bit field name access 07:02 reserved ro 01 em_bist_start rw(*) 00 csn_shram rw(*)
SPEAR-07-NC03 6 blocks description 185/194 6.17.4.6 shared ram test status register mnemonic : shram_test_status address : 0x3000_1c14 default value : 0x00 em_bist_error : when the bist is finished this bit tells whether the procedure was correct or not. em_bist_gonogo : when the bist is finished this bi t tells whether the memory passed or no the test. em_bist_done : this bit goes high when the bist is finished. bit field name access 07:03 reserved ro 02 em_bist_error ro 01 em_bist_gonogo ro 00 em_bist_done ro
7 electrical characteristics SPEAR-07-NC03 186/194 7 electrical characteristics 7.1 absolute maximum rating this product contains devices to protect the inpu ts against damage due to high static voltages, however it is advisable to take normal precaution to avoid application of any voltage higher than the specified maximum rated voltages. table 22. absolute maximum ratings warning: stresses above those listed as "absolute maximum ratings" may cause permanent damage to the device. this is a stress rating only and functional operation of the device at these conditions is not implied. exposure to maximum rating conditions for extended periods may affect device reliability. symbol parameter value unit v dd3i/o supply voltage (i/o ring) -0.3 to 3.9 v v dd3pll supply voltage (pll) -0.3 to 3.9 v v dd supply voltage (core logic) -0.3 to 2.1 v v ddrtc supply voltage (real time clock) -0.3 to 2.1 v v i1 input voltage (except mclki, mclko, rtcxi, rtcxo, uhd+ and uhd-) vss ? 0.3 to vdd3i/o + 0.3 v v i2 input voltage for mclki, mclko vss ? 0.3 to vdd + 0.3 v v i3 input voltage for rtcxi and rtcxo v i4 input voltage for uhd+ and uhd- -0.5 to 5.5v v v o1 output voltage (except uhd+ and uhd-) vss ? 0.3 to vdd3i/o + 0.3 v v o2 output voltage for uhd+ and uhd- -0.5 to 5.5 v t stg storage temperature -60 to 150 c
SPEAR-07-NC03 7 electrical characteristics 187/194 7.2 recommended operating conditions table 23. recommended operating conditions note: 1 the device is characterized between -40c and 105c and tested at 25c and 85c. 7.3 dc electrical characteristics table 24. dc electrical characteristics (t a = 0c to +105c and v dd = 5v unless otherwise specified) note: 1 see the table 2 to determine which pins have hysteresis. 2 see the table 2 to determine the drive capability of the pads. 3 see the table 2 to determine which pins have pull-up. symbol parameter test conditions value unit min. typ. max. t a operating temperature range (see note 1) -40 105 c v dd3i/o power supply for i/o ring 3.0 3.3 3.6 v v dd3pll power supply of analog blocks inside pll 3.0 3.3 3.6 v v dd power supply for core logic 1.62 1.8 1.98 v v ddrtc power supply for rtc block 1.62 1.8 1.98 v f osc1 main oscillator frequency 25 mhz f osc2 oscillator for rtc 32.768 khz symbol parameter test conditions value unit min. typ. max. v il input low level voltage all input pins except ??.. 0.8 v v ih input high level voltage all input except ???. 2v v hys hysteresis voltage (note 1) 0.4 v v ol low level output voltage i ol = x ma (note 2) 0.4 v v oh high level output voltage i ol = x ma (note 2) 2.4 v i il - i ih input leackage current v ss < v in < v dd3i/o -10 +10 a r pu i/o weak pull up (note 3) 30 50 100 k ?
7 electrical characteristics SPEAR-07-NC03 188/194 7.3.1 p ower g ood timing requirement figure 28. p ower g ood requirement 7.4 ac electrical characteristics table 25. core power consumption (v dd = 1.8v, t a = 25c) symbol parameter test conditions value unit min. typ. max. i core core current consumption system clock freq. 48mhz, running code in internal sram 47 ma i core core current consumption system clock freq. 48mhz, running code in external flash memory 40 ma i core core current consumption system clock freq. 48mhz, running code in external sdram 44 ma 200 s min v dd core & v dd i/o p ower g ood (typical value - 5%) power on (typical value - 5%) (0.1 v) 100 ms max power off v dd core p ower g ood 200 s min v dd core & v dd i/o p ower g ood (typical value - 5%) power on (typical value - 5%) (0.1 v) 100 ms max power off v dd core p ower g ood
SPEAR-07-NC03 7 electrical characteristics 189/194 7.5 external memory bus timing 7.5.1 timings for extern al cpu writing access this section deals with expected timings for external cpu writing access. next diagram shows expected timing, as detailed in the following table . figure 29. external cpu writing timings table 26. expected timings for external cpu writing access (1) 1. nxpcs is the first signal asserted at the beginning of the writing cycle, as well as the last signal deasserted at the end of the writing cycle. nxpwe is asserted after, or at the same time, with res pect to the assertion of nxpcs. nxpwe assertion must be insensitive to nxpwait asserted. however, nxpwe deassertion must take place with nxpw ait deasserted. in other words, even though nxpwait is asserted, nxpwe must assert, while deassertion of nxpwe has to wait until nxpwait deassertion. once a writing access has finished, nx pcs must be kept deasserted for at least 45 ns, before starting next reading/writing access. symbol parameter test co nditions min typ max unit tw s nxpwe asserted versus nxpcs asserted 0ns tw s nxpwe deasserted versus nxpcs deasserted 0ns tdws data setup vs nxpwe rising edge 2 ns tdwh data hold vs nxpwe rising edge 2 ns tw d w d nxpwait deasserted vs nxpwe deasserted 0 ns tcsoff chip select off pulse width 45 ns tweon write enable pulse width 45 ns nxpcs xpaddr[12:1] nxpwait nxpwe (out) xpaddr[13] (in) (in) (in) xpdata[15:0] (inout) tws tws twdwd tdws tdwh tcsoff tweon
7 electrical characteristics SPEAR-07-NC03 190/194 7.5.2 timings for extern al cpu reading access timings for reading are about the same with respect to the writing access. the main difference is due to the data, which becomes valid at the ri sing edge of nxpwait, and it is kept until the end of the cycle. figure 30. external cpu reading timingss table 27. expected timings for external cpu reading access (1) 1. nxpcs is the first signal asserted at the beginning of the reading cycle, as well as the last signal deasserted at the end of the reading cycle. nxpre is asserted after, or at the same time, with respect to the assertion of nxpcs. nxpre assertion must be insensitive to nxpwait asserted. however, nxpre deassertion must take place with nxpw ait deasserted. in other words, even though nxpwait is asserted, nxpre must assert, while deassertion of nxpre has to wait until nxpwait deassertion. once a reading access has finished, nxpcs must be kept dea sserted for at least 45 ns before starting a new reading/ writing access. symbol parameter test co nditions min typ max unit tr s nxpre asserted versus nxpcs asserted 0ns tr s nxpre deasserted versus nxpcs deasserted 0ns tdrs data setup vs nxpwait rising edge 0ns tdrh data hold vs nxpre rising edge 20 ns tw d r d nxpwait deasserted vs nxpwe deasserted 0 ns tcsoff chip select off pulse width 45 ns treon read enable pulse width 45 ns nxpcsel xpaddr[12:1] nxpwait nxpre (out) xpaddr[13] (in) (in) (in) xpdata[15:0] (inout) trs trs twdrd tdrs tdrh tcsoff treon
SPEAR-07-NC03 8 reference document 191/194 8 reference document # name id description reference where 1 arm720t arm720t arm720t datasheet arm ddi 0087e www.arm.com 2 arm720t arm720t arm720 technical reference arm ddi0229a www.arm.com 3 amba bus amba ambatm specification rev 2.0 arm ihi 0011a www.arm.com 4 ieee1284 - ecp ?extended capabilities port protocol and isa interface standard rev 1.12? www.microsoft.com 5 openhci open host controller interface specification for usb release 1.0a compaq microsoft national semiconductor http:// h18000.www1.hp.com/ productinfo/development/ openhci.html
9 package information SPEAR-07-NC03 192/194 9 package information in order to meet environmental requirements, st offers these devices in ecopack ? packages. these packages have a lead-free second level interconnect. the category of second level interconnect is marked on the package and on th e inner box label, in compliance with jedec standard jesd97. the maximum ratings related to soldering conditions are also marked on the inner box label. ecopack is an st trademark. ecopack spec ifications are available at: www.st.com. figure 31. lfbga180 mechanical data & package dimensions outline and mechanical data dim. mm inch min. typ. max. min. typ. max. a 1.7 0.0669 a1 0.21 0.0083 a2 1.085 0.0427 a3 0.3 0.0118 a4 0.8 0.0315 b 0.35 0.4 0.45 0.0138 0.0157 0.0177 d 11.85 12 12.15 0.4665 0.4724 0.4783 d1 10.4 0.4094 e 11.85 12 12.15 0.4665 0.4724 0.4783 e1 10.4 0.4094 e 0.8 0.0315 f 0.8 0.0315 ddd 0.1 0.0039 eee 0.15 0.0059 fff 0.08 0.0031 lfbga180 l ow profile f ine pitch b all g rid a rray 7142667 c body: 12 x 12 x 1.7mm
SPEAR-07-NC03 10 revision history 193/194 10 revision history date revision changes 20-sep-2005 1 initial release. 30-jan-2006 2 the staus is changed from ?pre liminary data? to ?maturity?. corrected a typing error in the title of the section 6.4 on page 96 . updated the mechanical data in the ?package information? section. 28-feb-2006 3 modified section 6.3.1 on page 68 . 14-apr-2006 4 added new chapters section 7.4 on page 188 & section 7.5 on page 189 . 03-may-2006 5 modified figure 11 on page 121 . modified section 6.12 on page 162 . modified table 22 on page 186 .
SPEAR-07-NC03 194/194 please read carefully: information in this document is provided solely in connection with st products. stmicroelectronics nv and its subsidiaries (?st ?) reserve the right to make changes, corrections, modifications or improvements, to this document, and the products and services described he rein at any time, without notice. all st products are sold pursuant to st?s terms and conditions of sale. purchasers are solely responsible for the choice, selection and use of the st products and services described herein, and st as sumes no liability whatsoever relating to the choice, selection or use of the st products and services described herein. no license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. i f any part of this document refers to any third party products or services it shall not be deemed a license grant by st for the use of such third party products or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoev er of such third party products or services or any intellectual property contained therein. unless otherwise set forth in st?s terms and conditions of sale st disclaims any express or implied warranty with respect to the use and/or sale of st products including without limitation implied warranties of merchantability, fitness for a parti cular purpose (and their equivalents under the laws of any jurisdiction), or infringement of any patent, copyright or other intellectual property right. unless expressly approved in writing by an authorize representative of st, st products are not designed, authorized or warranted for use in military, air craft, space, life saving, or life sustaining applications, nor in products or systems, where failure or malfunction may result in personal injury, death, or severe property or environmental damage. resale of st products with provisions different from the statements and/or technical features set forth in this document shall immediately void any warranty granted by st for the st product or service described herein and shall not create or extend in any manner whatsoev er, any liability of st. st and the st logo are trademarks or registered trademarks of st in various countries. information in this document supersedes and replaces all information previously supplied. the st logo is a registered trademark of stmicroelectronics. all other names are the property of their respective owners. ? 2006 stmicroelectronics - all rights reserved stmicroelectronics group of companies australia - belgium - brazil - canada - china - czech republic - finland - france - germany - hong kong - india - israel - ital y - japan - malaysia - malta - morocco - singapore - spain - sweden - switzerland - united kingdom - united states of america www.st.com


▲Up To Search▲   

 
Price & Availability of SPEAR-07-NC03

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X